diff options
author | Norbert Preining <preining@logic.at> | 2008-01-24 07:43:25 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-01-24 07:43:25 +0000 |
commit | cb0cee48ce74d2facdeb05cba0a1981f3a107757 (patch) | |
tree | ba04742a7b147d991ac1066d485233fb643e9f48 /Master | |
parent | 7f8190c0c1f14af45ff7c5d81a12e2a418b222cd (diff) |
look up the country codes in the Rfc/Mime section
git-svn-id: svn://tug.org/texlive/trunk@6383 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/tlpkg/TeXLive/TLWinGoo.pm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Master/tlpkg/TeXLive/TLWinGoo.pm b/Master/tlpkg/TeXLive/TLWinGoo.pm index 2acaf622950..e72896a8bf9 100644 --- a/Master/tlpkg/TeXLive/TLWinGoo.pm +++ b/Master/tlpkg/TeXLive/TLWinGoo.pm @@ -72,6 +72,8 @@ BEGIN { } } +use TeXLive::TLUtils; + ######################################### # Variables storing status information. @@ -155,9 +157,13 @@ Two-letter country code representing the locale of the current user sub reg_country { my $value = $Registry -> {"CUser/Control Panel/International//Locale"}; - my $lm = $Registry -> Open("LMachine/SYSTEM/CurrentControlSet/Control/" . - "Keyboard Layout/DosKeybCodes/", {Access => sys_access_permissions()}); - return $lm -> {$value}; + $value = substr $value, -4; + my $lm = $Registry -> Open("HKEY_CLASSES_ROOT/MIME/Database/Rfc1766/", + {Access => KEY_READ()})->{"/$value"}; + tllog($::LOG_DEBUG, "found lang codes value = $value, lm = $lm...\n"); + if ($lm) { + return(substr $lm, 0, 2); + } } =pod |