Tcl Source Code

Artifact [889220ec7c]
Login

Artifact 889220ec7ce70c8ec4c7b6bd8b237747dcaf66bc:

Attachment "msgcat-1.4.5.tm-script.patch" to ticket [3536888fff] added by oehhar 2012-06-29 21:35:15.
--- C:/Tcl85/lib/tcl8/8.5/msgcat-1.4.5.tm	Fri Jun 29 16:33:06 2012
+++ C:/Tcl85/lib/tcl8/8.5/msgcat-1.4.5.rep.tm	Fri Jun 29 16:26:52 2012
@@ -464,26 +464,22 @@
     # settings, or fall back on locale of "C".
     #
 
-	# First check registry value LocalName present from Windows Vista
+    # First check registry value LocalName present from Windows Vista
     # which contains the local string as RFC5646, composed of:
     # [a-z]{2,3} : language
-    # -[a-z]{4}  : script (optional, translated by table Latn->latin)
+    # -[a-z]{4}  : script (optional, not used)
     # -[a-z]{2}|[0-9]{3} : territory (optional, numerical region codes not used)
     # (-.*)* : variant, extension, private use (optional, not used)
     # Those are translated to local strings.
-    # Examples: de-CH -> de_ch, sr-Latn-CS -> sr_cs@latin, es-419 -> es
+    # Examples: de-CH -> de_ch, sr-Latn-CS -> sr_cs, es-419 -> es
     #
     set key {HKEY_CURRENT_USER\Control Panel\International}
     if {([registry values $key "LocaleName"] ne "")
-	    && [regexp {^([a-z]{2,3})(?:-([a-z]{4}))?(?:-([a-z]{2}))?(?:-.+)?$}\
+	    && [regexp {^([a-z]{2,3})(?:-[a-z]{4})?(?:-([a-z]{2}))?(?:-.+)?$}\
 	    [string tolower [registry get $key "LocaleName"]] match locale\
-	    script territory]} {
+	    territory]} {
 	if {"" ne $territory} {
 	    append locale _ $territory
-	}
-	set modifierDict [dict create latn latin cyrl cyrillic]
-	if {[dict exists $modifierDict $script]} {
-	    append locale @ [dict get $modifierDict $script]
 	}
 	if {![catch {
 	    mclocale [ConvertLocale $locale]