gnome-vfs and encodings
[email protected] Sat, 6 Dec 2003 17:53:32 +0100
| Newsgroups | gmane.comp.gnome.lib.devel |
|---|---|
| Message-ID | <258B0164D480D5118D900800062B385801A055DE@vihsx09a.vih.infineon.com> |
I'm changing regexxer http://regexxer.sourceforge.net/ to use gnome-vfs instead of GIOChannel to read data, so it can use non-local file systems. When using GIOChannel to read text from a file, we can use g_io_channel_set_encoding() to specify the text encoding, because not every file is UTF8 encoded. http://developer.gnome.org/doc/API/2.2/glib/glib-IO-Channels.html#g-io-chann el-set-encoding GIOChannel seems to be able to detect if the encoding is wrong. Is there any equivalent for gnome_vfs_read(), or does gnome-vfs expect all text data to be in UTF8 format? Maybe the difference is that GIOChannel reads whole characters (1...n bytes) at a time, but gnome-vfs reads bytes. Hmm, I seem to be answering my own question, but I'll post anyway in case anyone has anything helpful to say. Murray Cumming www.murrayc.com [email protected]