Re: GIOChannel and german umlauts
- From: Owen Taylor <otaylor redhat com>
- To: Tilman Sauerbeck <tilman code-monkey de>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GIOChannel and german umlauts
- Date: Fri, 20 Dec 2002 12:57:50 -0500 (EST)
Tilman Sauerbeck <tilman code-monkey de> writes:
Hi,
I'm writing an application that uses GIOChannel for communication over
a socket.
On the other side, input is sent as ISO-8859-1.
In my app, I'm not setting a encoding for the GIOChannel, i.e. encoding
is NULL. Now when I'm sending or receiving text that contains special
characters such as german umlauts, my application segfaults when
LC_CTYPE is not set to a locale that supports those characters:
e.g., when running with LC_CTYPE=de_DE it's working fine while running
with LC_CTYPE=POSIX will crash.
Setting the GIOChannels encoding to ISO-8859-1 doesn't help either.
"Doens't help" in what sense? It should convert the ISO-8859-1
to UTF-8. Which is genererally what you'd want in a GTK+-2.0 app.
(But remember, that you're users won't all be using ISO-8859-1)
Note that the default for GIOChannel is UTF-8, if you want no
conversion, you need to set the explicitely.
This is described in:
http://developer.gnome.org/doc/API/2.0/glib/glib-IO-Channels.html#g-io-channel-unix-new
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]