Closed rupelodn closed 2 years ago
git fetch origin (my repository)
then you create a new fix branch from the origin/master.
The pull request branch should not contain the "Merge branch 'slorelee:master' into master" commits.
On my site:
C:\Users\Slore>reg query HKLM\SYSTEM\ControlSet001\Control\Nls\Locale /ve
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Nls\Locale
(Default) REG_SZ 00000804
So it be tokens=3 not 4, the "Default" is not right on your OS.
Could you show your result (it is fine in Russian) ?
Hi Slore, my reg query works the same as yours:
D:\z-debug>reg query HKLM\SYSTEM\ControlSet001\Control\Nls\Locale /ve HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Nls\Locale (default) REG_SZ 00000419
Next, I slightly changed your code for testing:
@echo off set _LocaleId= for /f "tokens=3" %%l in ('reg query "HKLM\SYSTEM\ControlSet001\Control\Nls\Locale" /ve') do ( set _LocaleId=%%l ) echo Locale ID is %_LocaleId%
set _LayoutFile= for /f "tokens=4" %%l in ('reg query "HKLM\SYSTEM\ControlSet001\Control\Keyboard Layouts\%_LocaleId%" /v "Layout File"') do ( set _LayoutFile=%%l ) echo [INFO] Got LocaleId:%_LocaleId% echo [INFO] Got LayoutFile:%_LayoutFile% set _LocaleId= set _LayoutFile= pause
The result is on the screen:
Locale ID is REG_SZ Error: The specified section or parameter cannot be found in the registry. [INFO] Got LocaleId:REG_SZ [INFO] Got LayoutFile: To continue, press any key . . .
I decided to change "3" to "4" in this code. The output result on the screen has changed:
Locale ID is 00000419 [INFO] Got LocaleId:00000419 [INFO] Got LayoutFile:KBDRU.DLL To continue, press any key . . .
I'm attaching for the test NLS_KBD_Query.bat.txt There I have already changed "3" to "4". NLS_KBD_Query.bat.txt
tokens=4
failed on Windows in zh-CN language.
How about next one on your Windows?
set _LocaleId=
for /f "tokens=3" %%l in ('reg query "HKLM\SYSTEM\ControlSet001\Control\Nls\Locale" /v "(Default)"') do (
set _LocaleId=%%l
)
echo Locale ID is %_LocaleId%
C:\Users\Slore>for /f "tokens=3,4" %i in ("(default) REG_SZ 00000419") do echo 3=%i, 4=%j
C:\Users\Slore>echo 3=00000419, 4=
3=00000419, 4=
C:\Users\Slore>for /f "tokens=3,4" %i in (" (default) REG_SZ 00000419") do echo 3=%i, 4=%j
C:\Users\Slore>echo 3=00000419, 4=
3=00000419, 4=
Hi Slore, yes, it is work:
D:\z-debug>set _LocaleId=
D:\z-debug>for /F "tokens=3" %l in ('reg query "HKLM\SYSTEM\ControlSet001\Control\Nls\Locale" /v "(Default)"') do (set _LocaleId=%l )
D:\z-debug>(set _LocaleId=00000419 )
D:\z-debug>echo Locale ID is 00000419 Locale ID is 00000419
Hi, @rupelodn
Could you add a commit for pullrequest #81?
Use "tokens=3" and /v "(Default)"
.
Done.
Hi Slore, the localized keyboard layout file was not keeped. In line 15, in fonts, tahoma.ttf was written twice.