Re: Invalid utf-8



On Mon, Oct 18, 2010 at 09:41:21AM -0300, John Coppens wrote:
I'll compile your program this afternoon when I return home.

Which is the locale defined in your machine? Could that have any
influence on the workings of ...get_contents or ...set_text?

It should not have any influence as there is no text transformation
involved: g_file_get_contents() loads the file as a sequence of bytes
and gtk_text_buffer_set_text() simply assumes UTF-8 input.

It works for me with any locale, e.g. with

    LC_ALL=POSIX ./textviewtest

You can try to print the loaded text byte by byte if it matches what you
expect and also to run g_utf8_validate() on it directly.

Regards,

Yeti




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]