gnome-vfs and encodings



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
murrayc usa net



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