On Sun, 2009-04-05 at 15:35 +0200, Mark wrote: > The view source patch represents one day's work as it stands, working > well save for the print function + occasional utf8 errors from unruly pages;
With regard to text encodings, you do the following: > gtk_text_buffer_set_text(tb, bw->current_content->source_data, -1); There are a couple of issues here: 1) The source data is in the original page encoding, not UTF-8. 2) The source data isn't guaranteed to be NUL-terminated I suspect what you want to do is: a) Store a UTF-8 copy of the source data in nsgtk_source_window. b) Pass the correct byte length into gtk_text_buffer_set_text. Finding the encoding of the source data could be fun. For HTML contents, it should be available from within content->data.html. For any other content type, I don't think we store it. J.
