RE: Language characters



On Tue, 2003-07-15 at 10:58, martyn 2 russell bt com wrote:
I have a bug in my application where someone sends me 
umlauts and it is not
displayed correctly, see the bug here:

http://sourceforge.net/tracker/index.php?func=detail&aid=77125
9&group_id=646
00&atid=508042

The GtkTextView complains that it is not valid UTF8.  I thought umlauts
were
supported in UTF8.

Please read:

 http://developer.gnome.org/doc/API/2.0/gtk/gtk-question-index.htm,
question 1.7
 
 http://developer.gnome.org/dotplan/porting/ar01s10.html#gtk-utf8


Ok, I have read that and it makes sence, BUT, if I receive umlauts and they
are not valid UTF8, and I then proceed to use g_convert, how do I know if it
is text from a socket which character set I should be from (into UTF8)? 

The encoding has to be part of your network protocol. (Either by passing
it, or by defining what the encoding is as part of the protocol.)
You can't just have a random stream of bytes in an undefined encoding
and tell GTK+ to display it.

Regards,
                                                Owen





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