WINE is ignoring locale settings

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
dziki
Level 1
Level 1
Posts: 5
Joined: Sun Jun 13, 2010 11:26 am

WINE is ignoring locale settings

Post by dziki »

Even on plain WINEPREFIX I am unable to get Polish-specific chars to work.
On unix (Arch x64) everytching works fine.

Wine is setting wrong codepage in registry ( in HKEY_CURRENT_USER\Software\Wine\Fonts\Codepages apears "1252,437" while it should be "1252,437")

Code: Select all

$ locale
LANG=pl_PL.utf8
LC_CTYPE="pl_PL.utf8"
LC_NUMERIC="pl_PL.utf8"
LC_TIME="pl_PL.utf8"
LC_COLLATE="pl_PL.utf8"
LC_MONETARY="pl_PL.utf8"
LC_MESSAGES="pl_PL.utf8"
LC_PAPER="pl_PL.utf8"
LC_NAME="pl_PL.utf8"
LC_ADDRESS="pl_PL.utf8"
LC_TELEPHONE="pl_PL.utf8"                                                                                                                                    
LC_MEASUREMENT="pl_PL.utf8"
LC_IDENTIFICATION="pl_PL.utf8"
LC_ALL=

Running

Code: Select all

$ LC_ALL=pl_PL wine notepad.exe

-- or --
$ export LC_ALL=pl_PL
$ export LANG=pl_PL
$ wine notepad.exe
doesn't do the job. Both on wine wine-1.1.43 and wine-1.2_rc2-1

Help me pleas :)
PaulVriens
Newbie
Newbie
Posts: 3
Joined: Fri Sep 04, 2009 1:17 pm

Post by PaulVriens »

Try:

export LANG=pl_PL.UTF-8
winecfg (or whatever).
dziki
Level 1
Level 1
Posts: 5
Joined: Sun Jun 13, 2010 11:26 am

Post by dziki »

PaulVriens wrote:Try:

export LANG=pl_PL.UTF-8
winecfg (or whatever).
Nothing changes :(

Code: Select all

$ export LANG=pl_PL.UTF-8
$ mkdir /tmp/l
$ export WINEPREFIX=/tmp/l
$ wine notepad.exe
I've checked codepage in registry, it's wrong one.

Maybe some of this will help:

Code: Select all

$ locale -a
C
en_US
en_US.iso88591
en_US.utf8
pl_PL
pl_PL.iso88592
pl_PL.utf8
polish
POSIX
ru_RU.utf8
ru_UA.utf8

Code: Select all

$ WINEDEBUG=warn+keyboard wine notepad.exe
warn:keyboard:X11DRV_KEYBOARD_DetectLayout 6 keysyms per keycode not supported, set to 4
warn:keyboard:X11DRV_KEYBOARD_DetectLayout Using closest match (Polish (programmer's) keyboard layout) for scan/virtual codes mapping.
warn:keyboard:X11DRV_InitKeyboard vkey 010D is being used by more than one keycode
<repeat for diferent vkeys>
warn:keyboard:X11DRV_InitKeyboard No more vkeys available!
warn:keyboard:X11DRV_KEYBOARD_DetectLayout 6 keysyms per keycode not supported, set to 4
warn:keyboard:X11DRV_KEYBOARD_DetectLayout Using closest match (Polish (programmer's) keyboard layout) for scan/virtual codes mapping.
warn:keyboard:X11DRV_InitKeyboard vkey 010D is being used by more than one keycode
<repeat for diferent vkeys>
warn:keyboard:X11DRV_InitKeyboard No more vkeys available!
warn:keyboard:X11DRV_ToUnicodeEx no char for keysym fe03 (ISO_Level3_Shift) :
warn:keyboard:X11DRV_ToUnicodeEx virtKey=E9, scanCode=66, keycode=108, state=0
warn:keyboard:X11DRV_ToUnicodeEx no char for keysym 01b3 (lstroke) :
warn:keyboard:X11DRV_ToUnicodeEx virtKey=4C, scanCode=26, keycode=46, state=80
warn:keyboard:X11DRV_ToUnicodeEx no char for keysym 01b3 (lstroke) :
warn:keyboard:X11DRV_ToUnicodeEx virtKey=4C, scanCode=26, keycode=46, state=80
warn:keyboard:X11DRV_ToUnicodeEx Unknown virtual key 12 !!!
James McKenzie

WINE is ignoring locale settings

Post by James McKenzie »

dziki wrote:
Even on plain WINEPREFIX I am unable to get Polish-specific chars to work.
On unix (Arch x64) everytching works fine.

Wine is setting wrong codepage in registry ( in HKEY_CURRENT_USER\Software\Wine\Fonts\Codepages apears "1252,437" while it should be "1252,437")

I'm confused. Looks like you have a cut-n-paste error. What actually
is in your registry: "1252" is the code page for English/C. If that is
all that is appearing, something is not correct based upon what you
wrote here:

Code: Select all


[/quote]
[quote]$ locale
LANG=pl_PL.utf8
LC_CTYPE="pl_PL.utf8"
LC_NUMERIC="pl_PL.utf8"
LC_TIME="pl_PL.utf8"
LC_COLLATE="pl_PL.utf8"
LC_MONETARY="pl_PL.utf8"
LC_MESSAGES="pl_PL.utf8"
LC_PAPER="pl_PL.utf8"
LC_NAME="pl_PL.utf8"
LC_ADDRESS="pl_PL.utf8"
LC_TELEPHONE="pl_PL.utf8"                                                                                                                                    
LC_MEASUREMENT="pl_PL.utf8"
LC_IDENTIFICATION="pl_PL.utf8"
LC_ALL=



Running


Code:

$ LC_ALL=pl_PL wine notepad.exe

-- or --
$ export LC_ALL=pl_PL
$ export LANG=pl_PL
$ wine notepad.exe


There is a way to force this, but since I'm on a Mac it does not work.
I actually have to change the codepage at the top of the screen for this
to work.

James McKenzie
PaulVriens
Newbie
Newbie
Posts: 3
Joined: Fri Sep 04, 2009 1:17 pm

Post by PaulVriens »

Yeah, sorry that last reply of mine didn't make sense (as you've already tried that).

If I start with pl_PL.UTF-8 on a clean .wine I get 1250,852 in the registry. (1252,437 normally for me).

So sorry, no idea what is wrong on your box.
dziki
Level 1
Level 1
Posts: 5
Joined: Sun Jun 13, 2010 11:26 am

Re: WINE is ignoring locale settings

Post by dziki »

James McKenzie wrote:I'm confused. Looks like you have a cut-n-paste error. What actually
is in your registry: "1252" is the code page for English/C. If that is
all that is appearing, something is not correct based upon what you
wrote here:
Sorry, it should be, for pl_PL.utf8: 1250,852. But in registry i have 1252,437 ( en_Us.C)

There is a way to force this, but since I'm on a Mac it does not work.
I actually have to change the codepage at the top of the screen for this
to work.
So there a way to force wine to use codepage and ignore LC_* LANG etc. ? Where can i find it?

Might it all because wine looks for UTF-8 and ignores utf8?
I don't know if it has something in common but I found that glibc converts UTF-8 to utf8, and programs should use its functions to get locale and charsets not system vars.
James McKenzie

WINE is ignoring locale settings

Post by James McKenzie »

dziki wrote:
PaulVriens wrote:
Try:

export LANG=pl_PL.UTF-8
winecfg (or whatever).

Nothing changes :(


Code:

$ export LANG=pl_PL.UTF-8
$ mkdir /tmp/l
$ export WINEPREFIX=/tmp/l
$ wine notepad.exe




I've checked codepage in registry, it's wrong one.

Maybe some of this will help:


Code:

You are selecting US_English before you select Polish. Can you either
remove US_English or reverse the selection?
$ locale -a
C
en_US
en_US.iso88591
en_US.utf8
pl_PL
pl_PL.iso88592
pl_PL.utf8
polish
POSIX
ru_RU.utf8
ru_UA.utf8






Code:
$ WINEDEBUG=warn+keyboard wine notepad.exe
warn:keyboard:X11DRV_KEYBOARD_DetectLayout 6 keysyms per keycode not supported, set to 4
warn:keyboard:X11DRV_KEYBOARD_DetectLayout Using closest match (Polish (programmer's) keyboard layout) for scan/virtual codes mapping.
warn:keyboard:X11DRV_InitKeyboard vkey 010D is being used by more than one keycode
Looks like the use of Polish and Cyrillic is causing problems here, but
I'm not certain.

James McKenzie
dziki
Level 1
Level 1
Posts: 5
Joined: Sun Jun 13, 2010 11:26 am

Re: WINE is ignoring locale settings

Post by dziki »

You are selecting US_English before you select Polish. Can you either
remove US_English or reverse the selection?
After removing cyrlic and us from locale.gen, generating, reboot.
In rc.conf a have LOCALE="pl_PL.UTF-8"

Code: Select all

$ locale -a
C
pl_PL
pl_PL.iso88592
pl_PL.utf8
polish
POSIX
$ locale
LANG=pl_PL.UTF-8
LC_CTYPE="pl_PL.utf8"
LC_NUMERIC="pl_PL.utf8"
LC_TIME="pl_PL.utf8"
LC_COLLATE="pl_PL.utf8"
LC_MONETARY="pl_PL.utf8"
LC_MESSAGES="pl_PL.utf8"
LC_PAPER="pl_PL.utf8"
LC_NAME="pl_PL.utf8"
LC_ADDRESS="pl_PL.utf8"
LC_TELEPHONE="pl_PL.utf8"
LC_MEASUREMENT="pl_PL.utf8"
LC_IDENTIFICATION="pl_PL.utf8"
LC_ALL=pl_PL.utf8
$ wine regedit.exe
$ wine notepad.exe
And i hate to say nothing changes :(
dziki
Level 1
Level 1
Posts: 5
Joined: Sun Jun 13, 2010 11:26 am

Post by dziki »

After: WINEDEBUG=trace+all wine notepad.exe &> log i found that wine ignores pl_PL in some way.

Is there a way to determine why wine flips back to C locale?

Code: Select all

$ cat log | grep GetLocaleInfoW
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x1004,0xffea3f40,2)
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x1004,0xffea3f40,2) returning number 1252
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x1011,0xffea3f48,2)
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x1011,0xffea3f48,2) returning number 10000
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0xb,0xffea3f4c,2)
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0xb,0xffea3f4c,2) returning number 437
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x1030,0xffea3f44,2)
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x1030,0xffea3f44,2) returning number 28591
001d:trace:imports:import_dll --- GetLocaleInfoW kernel32.dll.506 = 0x7ee32ea0
001d:trace:imports:import_dll --- GetLocaleInfoW kernel32.dll.506 = 0x7ee0e4f0
001d:trace:imports:import_dll --- GetLocaleInfoW kernel32.dll.506 = 0x7ee0e4f0
001d:trace:imports:import_dll --- GetLocaleInfoW kernel32.dll.506 = 0x7ee0e4f0
001d:trace:imports:import_dll --- GetLocaleInfoW KERNEL32.dll.285 = 0x7ee0e4f0
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x1004,0x34facc,2)
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x1004,0x34facc,2) returning number 1252
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0xb,0x34fac4,2)
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0xb,0x34fac4,2) returning number 437

Code: Select all


$ cat log | grep pl_PL         
001d:trace:nls:MultiByteToWideChar cp 65010 "LC_ALL=pl_PL\x00" -> (null), ret = 13
001d:trace:nls:MultiByteToWideChar cp 65010 "LC_TYPE=pl_PL\x00" -> (null), ret = 14
001d:trace:nls:MultiByteToWideChar cp 65010 "LANG=pl_PL\x00" -> (null), ret = 11
001d:trace:nls:MultiByteToWideChar cp 65010 "LC_ALL=pl_PL\x00" -> L"LC_ALL=pl_PL\0000", ret = 13
001d:trace:nls:MultiByteToWideChar cp 65010 "LC_TYPE=pl_PL\x00" -> L"LC_TYPE=pl_PL\0000", ret = 14
001d:trace:nls:MultiByteToWideChar cp 65010 "LANG=pl_PL\x00" -> L"LANG=pl_PL\0000", ret = 11

Code: Select all


$ cat log | grep LC_TYPE
001d:trace:nls:MultiByteToWideChar cp 65010 "LC_TYPE=pl_PL\x00" -> (null), ret = 14
001d:trace:nls:MultiByteToWideChar cp 65010 "LC_TYPE=pl_PL\x00" -> L"LC_TYPE=pl_PL\0000", ret = 14

Code: Select all


$ cat log | grep locale 
001d:trace:nls:parse_locale_name L"C"
001d:trace:nls:setup_unix_locales got lcid 0409 (4 matches) for LC_CTYPE="C"
001d:trace:xim:open_xim Using C locale of Input Method
Could it be bocause:

Code: Select all

warn:font:AddFontToList Unable to load font "/home/michal/.wine/dosdevices/c:/windows/Fonts/vgaoem.fon"/(nil) err = 1
warn:font:AddFontToList Unable to load font "/home/michal/.wine/dosdevices/c:/windows/Fonts/vgafix.fon"/(nil) err = 1
warn:font:AddFontToList Unable to load font "/usr/bin/../share/wine/fonts/vgafix.fon"/(nil) err = 1
warn:font:AddFontToList Unable to load font "/home/michal/.wine/dosdevices/c:/windows/Fonts/kanjic01.hsf"/(nil) err = 2
warn:font:AddFontToList Ignoring font "/home/michal/.wine/dosdevices/c:/windows/Fonts/courier-bold.pfa"/(nil)
[...]
James McKenzie

WINE is ignoring locale settings

Post by James McKenzie »

dziki wrote:
After: WINEDEBUG=trace+all wine notepad.exe &> log i found that wine ignores pl_PL in some way.

Is there a way to determine why wine flips back to C locale?



Code:

$ cat log | grep GetLocaleInfoW
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x1004,0xffea3f40,2)
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x1004,0xffea3f40,2) returning number 1252
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x1011,0xffea3f48,2)
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x1011,0xffea3f48,2) returning number 10000
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0xb,0xffea3f4c,2)
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0xb,0xffea3f4c,2) returning number 437
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x1030,0xffea3f44,2)
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x1030,0xffea3f44,2) returning number 28591
001d:trace:imports:import_dll --- GetLocaleInfoW kernel32.dll.506 = 0x7ee32ea0
001d:trace:imports:import_dll --- GetLocaleInfoW kernel32.dll.506 = 0x7ee0e4f0
001d:trace:imports:import_dll --- GetLocaleInfoW kernel32.dll.506 = 0x7ee0e4f0
001d:trace:imports:import_dll --- GetLocaleInfoW kernel32.dll.506 = 0x7ee0e4f0
001d:trace:imports:import_dll --- GetLocaleInfoW KERNEL32.dll.285 = 0x7ee0e4f0
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x1004,0x34facc,2)
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0x1004,0x34facc,2) returning number 1252
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0xb,0x34fac4,2)
001d:trace:nls:GetLocaleInfoW (lcid=0x409,lctype=0xb,0x34fac4,2) returning number 437


Looks like this is in your registry. Can you check what locale is set
there?

James McKenzie
jarekczek
Newbie
Newbie
Posts: 2
Joined: Tue Jul 26, 2011 12:12 pm

Post by jarekczek »

Hi
Having the same issue I can answer:
in the registry there is: 1252,437
jarekczek
Newbie
Newbie
Posts: 2
Joined: Tue Jul 26, 2011 12:12 pm

Post by jarekczek »

But I have also a resolution:

LC_ALL=pl_PL wine notepad

I want all manuals in English and I have a global setting of LC_ALL to en_US. That's why my wine was resistant to Polish characters.
Locked