On Oct 25, 2008, at 1:16 PM, Krzysztof Kosiński wrote:
Yes, I know about the UTF-8 issue. The problem is that Inkscape uses UTF-8
filenames thorought the codebase rather than filenames in filename encoding,
as required by Glib conventions. This causes a lot of fuss when working with
Glib APIs - e.g. Inkscape::IO::file_test. When it comes to file contents the
only problematic part is incremental reading of UTF-8 data, but it seems
Inkscape doesn't do this.
The problem is not really that it uses UTF-8 filenames exactly. The data inside the program should be UTF-8 so that all the stock API's will work.
The problem is that as filenames enter the program they need to be converted from filename encoding to UTF-8. And when locale data comes it, it must be converted from locale encoding to UTF-8. And when data goes out to a filename, it needs to be converted from UTF-8 to filename encoding, etc.
So we need to normalize on UTF-8 data as it comes in, and convert to the precise encoding needed as it goes out. And which encoding is needed depends on where the data is going out to. It's very common for the same data item to go out to one call that needs filename encoding, and also to a different call that needs locale encoding.