Re: gnome-vfs and character sets



On Sun, 2004-03-14 at 01:32, Christian Biesinger wrote:
> [please cc me on replies... I'm not subscribed to this list]
> 
> Hello,
> I've got a question about the character sets used by gnome-vfs; 
> specifically:
> o) If I give gnome-vfs a file: URI, how should non-ascii characters be 
> encoded? Should I give it escaped UTF-8, or unescaped UTF-8, or should I 
> use the filesystem's charset?
> (the function I'm most interested in in this context is 
> gnome_vfs_get_file_info)

You should use the filesystems charset (which is undefined, filenames
are bytestrings). 

> o) What character set is used for the filename member of the 
> GnomeVFSFileInfo struct?

None. Its a byte string (without \0 or / in) corresponding to the
filename bytestring on the disk.

> o) For authentication information (username, password), what character 
> set should be used for non-ascii characters? UTF-8?

At the moment everything uses UTF-8 here, although I dunno if anything
does anything with this behind the scenes. I think we just pass on the
strings. However, username/password rarely use > 127 characters i guess,
and for the case they do, lets bloody hope they use utf8. :)

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a suave zombie master criminal with nothing left to lose. She's a ditzy 
gold-digging snake charmer with an MBA from Harvard. They fight crime! 




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