pspp-dev
[Top][All Lists]
Advanced

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

Problem with non-ascii filenames on a non utf-8 locale


From: Michel Boaventura
Subject: Problem with non-ascii filenames on a non utf-8 locale
Date: Sat, 08 May 2010 00:35:09 -0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4

Hello,

More about the filename issue:

Glib manual says (on http://library.gnome.org/devel/glib/stable/glib-Character-Set-Conversion.html#file-name-encodings-checklist):

"If you get a file name from the file system from a function such as readdir(3) or gtk_file_chooser_get_filename(), you do not need to do any conversion to pass that file name to functions like open(2), rename(2), or fopen(3) — those are "raw" file names which the file system understands."

If I understand this right, since we get filename directly from the command line, we don't need to convert it to open the file. If the locale support utf8 or not, we will get the string on the same locale that we need to open the file. So we may not need the two step conversion from load_data_file function.

But we do need to convert it to show the name on syntax:
"If you need to display a file name, convert it to UTF-8 first by using g_filename_to_utf8()..."

I don't know if this function is used to open file in other contexts, like syntax files, or File -> Open menu but, if not, I think we should get rid of the two step conversion from load_data_file function.

What you think?

Regards,

Michel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]