Skip to content
Tcl Source Code Artifact [ec5d67e685]
Login

Artifact [ec5d67e685]

Artifact ec5d67e685b0fd1e7472b78a2479f82e12ce58bd:

Ticket change [ec5d67e685] - New ticket [3536888fffffffff|3536888fff] <i>Locale guessing of msgcat fails on (some) Windows 7</i>. by oehhar on 2012-06-21 12:41:10.
D 2012-06-21T12:41:10
J assignee dgp
J cmimetype text/plain
J comment I\sexperienced\son\sa\sgerman-swiss\swindows\s7\scomputer,\sthat\s:\n<session\son\stcl\s8.5.11>\n%\spackage\srequire\smsgcat\n1.4.4\n%\smsgcat::mcpreferences\nen_us\sen\s{}\n</session>\n\n(the\slast\sresult\sshould\sbe\s"de_ch\sde\s{}")\n\nThe\sreason\sfor\sthat\sis,\sthat\sthe\slanguage\sis\sdetected\sobserving\sthe\nregistry\skey:\n\s\s[HKEY_CURRENT_USER\\Control\sPanel\\International\\Locale]\nIt\scontains\sa\snumerical\sLanguage\sID\s(LCID).\n\nPossible\svalues\sare\sin\sthe\sregistry\ssubtree:\n\s\s[HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\MIME\\Database\\Rfc1766]\n\nExtract:\n0409\sen_us\s<-\sthis\sis\sset\n0407\sde\s\s\s\s\s\s<-\sthis\smight\sbe\sacceptable\n0807\sde_ch\s<-\sthis\swould\sbe\scorrect\n\nThe\sobserved\svalue\sis\s"0409"\swhich\sis\sen_us.\nThe\scorrect\svalue\swould\sbe\s"de_ch".\sStill\sacceptable\sis\s"de".\n\nI\sfound\sother\sreports,\sthat\sthis\sregistry\skey\sis\snot\sreliable\susing\nwindows\s7:\nhttp://social.technet.microsoft.com/Forums/en/w7itproinstall/thread/8597901e-47a8-4457-a8dc-653a260808b3\n\nfollowing\sthe\slinks\sat\sthe\send\nhttp://blogs.msdn.com/b/michkap/archive/2010/03/19/9980203.aspx\nit\sis\sproposed,\sthat:\n-\sthere\sis\sa\snew\skey\s(since\sVista\sI\sthink)\swhich\scontain\sdirectly\sthe\nIETF\slanguage\stag\s(which\sis\sclose\sto\sthe\slocale):\n\s\s[HKEY_CURRENT_USER\\Control\sPanel\\International\\LocaleName]\n\nIn\sthis\scase,\sthis\swould\shelp.\sThe\scontained\svalue\s"de-CH"\sis\scorrect.\n\n----\n\nAnyway,\sthe\srecommended\smethod\sis\sto\suse\sthe\ssystem\scall:\n\s\sGetSystemDefaultLCID()\nand\sfrom\sVista\son:\n\s\sGetUserDefaultLocaleName()\n\n---\n\nTwo\spossible\smethods\sto\ssolve\sthe\sissue:\n\n1)\sextend\smsgcat\sto\sfirst\slook\sto\sLocaleName\n\s\s\sThis\sis\sofficially\snot\ssupported\sbut\swould\ssolve\sin\sthis\scase\n\s\s\sThe\sregistry\sentry\s"LocaleName"\sis\sseen\sas\smore\sreliable,\sas\sall\smodern\sAPIs\suse\sthis\sinstead\sof\sCLID's.\n\s\s\sA\spatch\sfor\sthis\scase\sis\sattached.\n\n2)\sextend\stcl\sto\sreturn\sthe\scurrent\ssystem\slocale\sby\san\sapi\n\s\s\sThis\srequires\sbinary\scode\n\n\n\n
J foundin obsolete:\s8.5.11
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter oehhar
J subsystem 30.\smsgcat\sPackage
J title Locale\sguessing\sof\smsgcat\sfails\son\s(some)\sWindows\s7
J type Bug
K 3536888fffffffffffffffffffffffffffffffff
U oehhar
Z 52a425aeb025af7b1e0f88d6634da964