>>>>> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:

Georg> Currently we have several UNICODE FIXMEs in the code where we
Georg> pass an utf8 encoded filename to an fstream and hope that it
Georg> will work. This is wrong, because the encoding of filenames
Georg> depends on the locale on linux. I don't know what it is on
Georg> windows, I never use non-ascii filenames.

Does encoding of file depend on locale? Isn't it stored on the
filesystem? 

Georg> - Split the existing FileName class into a general part that
Georg> can be used for any filename, and a part that is specialized
Georg> for files that appear in documents. This is done by the
Georg> attached patch. 

Why do you need to separate them?

Georg> - Convert both file name classes to docstring 

OK.

Georg> - Store all filenames not as string or docstring, but in the
Georg> FileName class and convert all functions that take a filename
Georg> argument to the FileName class. That will eliminate a lot of
Georg> assertions on absolute paths. 

Do we _have_ to do that now?

Georg> - Add a method to the FileName class that returns the name as a
Georg> std::string in the right encoding for the file system.

Yes.

Georg> This will generate rather large, but mechanical patches, but it
Georg> will basically not change the code, and it will guarantee that
Georg> no file name is stored in the wrong encoding. Later we could
Georg> for example change the internal storage of the FileName class
Georg> to use boost::filesystem if that has benefits.

Georg> If this is OK I will do this step by step during the next days.

I think this is OK with me.

JMarc

Reply via email to