http://bugs.winehq.org/show_bug.cgi?id=9767
Summary: Some unicode characters show up as '?' in file selection dialog Product: Wine Version: CVS/GIT Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: wine-misc AssignedTo: wine-bugs@winehq.org ReportedBy: ncliang@gmail.com
To reproduce, create a file with greek characters such as "ΑΒΓΔ.txt". Run notepad and open the file in the open file dialog. Observe that the filename shows up as "ΑΒ??.txt" instead of "ΑΒΓΔ.txt".
Lei pointed out that most fonts should have the glyphs needed to display greek characters, so this is unlikely a font issue....
http://bugs.winehq.org/show_bug.cgi?id=9767
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #1 from Juan Lang juan_lang@yahoo.com 2007-09-24 18:40:32 --- Confirming. Note if you select the file, the correct filename appears in the filename text field.
http://bugs.winehq.org/show_bug.cgi?id=9767
--- Comment #2 from Mikolaj Zalewski mikolaj.zalewski@gmail.com 2007-09-24 23:35:35 --- Created an attachment (id=8201) --> (http://bugs.winehq.org/attachment.cgi?id=8201) patch
This is because the shell view control is ANSI, so the listview sends LVN_GETDISPINFOA instead of LVN_GETDISPINFOW to get the item name. This patch makes the classes Unicode and fixes some other W->A conversions. ANSI is still used for sorting and in some parts of menu building. If there are no visible regressions caused by this patch I can divide it into smaller parts and send it to wine-patches.
http://bugs.winehq.org/show_bug.cgi?id=9767
--- Comment #3 from Dmitry Timoshkov dmitry@codeweavers.com 2007-09-25 00:08:16 --- If A<->W conversions cause this bug that means that the user has wrong locale, i.e. not a greek one. If that's confirmed then this bug is invalid.
http://bugs.winehq.org/show_bug.cgi?id=9767
Mikolaj Zalewski mikolaj.zalewski@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mikolaj.zalewski@gmail.com
--- Comment #4 from Mikolaj Zalewski mikolaj.zalewski@gmail.com 2007-09-25 00:50:16 --- Why can't a non-Greek have a file with a Greek filename? In Windows NT/2000/... it's possible (recently even Microsoft is introducing Unicode-only locales where the ACP (AFAIK it's always CP1252) doesn't contain native characters).
Maybe it's more an enhancement than a bug but closing it as invalid would be IMHO wrong.
http://bugs.winehq.org/show_bug.cgi?id=9767
--- Comment #5 from Dmitry Timoshkov dmitry@codeweavers.com 2007-09-25 01:26:59 ---
Why can't a non-Greek have a file with a Greek filename? In Windows NT/2000/... it's possible (recently even Microsoft is introducing Unicode-only locales where the ACP (AFAIK it's always CP1252) doesn't contain native characters).
That's highly depends on an app. If an app uses exclusively Unicode APIs then it should be able to correctly work (assuming that underlying system's encoding is UTF-8). If an application uses ANSI APIs that's impossible, due to loses in A<->W translation path.
http://bugs.winehq.org/show_bug.cgi?id=9767
--- Comment #6 from Dmitry Timoshkov dmitry@codeweavers.com 2007-09-25 01:31:24 --- If the target application is Wine's notepad (which is a unicode application) then once the patch is applied (it's obviously correct) the bug can be closed.
http://bugs.winehq.org/show_bug.cgi?id=9767
--- Comment #7 from Mikolaj Zalewski mikolaj.zalewski@gmail.com 2007-09-25 01:42:52 --- Of course it havealy depends on the app but I think internally in Wine the less W->A conversions, the better. Many apps (e.g. based on Qt, Java, .NET) are Unicode. But that also gives me the idea that we should check what GetOpenFileNameA does if the filename contains characters outside of the ACP. It's quite possible there is a message box explaining it and the function fails. I will try to check it.
http://bugs.winehq.org/show_bug.cgi?id=9767
--- Comment #8 from Dmitry Timoshkov dmitry@codeweavers.com 2007-09-25 05:39:27 --- W<->A conversions may fail for many legitimate reasons. I don't think that adding a FIXME, or ERR, or even MessageBox has anything to do with inability of a user to correctly set its locale. Not mentioning again that it can't be approached for every application out there.
Using A version of APIs (such as GetOpenFileNameA) is not an error, or mistake, it's deliberate decision of the application developer. We already have a janitorial project in Wine to eliminate W->A calls in APIs, there is no need to make this bug as a replacement of it, especially since it looks like just an oversight on the user's side.
http://bugs.winehq.org/show_bug.cgi?id=9767
--- Comment #9 from Nigel Liang ncliang@gmail.com 2007-09-25 16:14:03 --- Was run with LANG=en_US.UTF-8. Running with Greek locale did get rid of the problem, but why should we expect only people using Greek locale to have Greek filenames? I think this is a valid bug and should be closed once Mikolaj's patch goes in. The ANSI shell view control is not app dependent since it is called even within unicode apps such as notepad. I thought it was convention to not use ANSI functions internally and to translate the ANSI API calls to unicode for internal processing. Unless we would like to make the exception for shell view controller, this seems like it is just legacy code that should be updated to use unicode.
http://bugs.winehq.org/show_bug.cgi?id=9767
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Some unicode characters show|Some unicode characters show |up as '?' in file selection |up as '?' in file selection |dialog |dialog of builtin notepad
--- Comment #10 from Dmitry Timoshkov dmitry@codeweavers.com 2007-09-25 23:05:27 ---
Was run with LANG=en_US.UTF-8. Running with Greek locale did get rid of the problem, but why should we expect only people using Greek locale to have Greek filenames?
I believe that previous comments already explain why. Updating summary.
http://bugs.winehq.org/show_bug.cgi?id=9767
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #11 from Dmitry Timoshkov dmitry@codeweavers.com 2007-09-26 21:42:24 --- The patch was committed.
http://bugs.winehq.org/show_bug.cgi?id=9767
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #12 from Dmitry Timoshkov dmitry@codeweavers.com 2007-09-26 21:43:37 --- Closing.
http://bugs.winehq.org/show_bug.cgi?id=9767
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|CVS/GIT |unspecified
https://bugs.winehq.org/show_bug.cgi?id=9767
lunarlambda@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lunarlambda@gmail.com