tags 405968 patch
tags 405967 patch
thanks

Hello,

This patch removes the codeset and modifier of the current locale before
appending .UTF8.

i.e. any of ll_CC, ll_CC.CODESET, [EMAIL PROTECTED] and
[EMAIL PROTECTED] will be changed to ll_CC

I tested the regex in a python interpreter, but I did not tested to run
utf8migrationtool with the locales mentioned in 405967 and 405968.

Kind Regards,
-- 
Nekral
diff -rauN ../orig/utf8-migration-tool-0.4.3/utf8migrationtool ./utf8-migration-tool-0.4.3/utf8migrationtool
--- ../orig/utf8-migration-tool-0.4.3/utf8migrationtool	2005-03-17 23:15:23.000000000 +0100
+++ ./utf8-migration-tool-0.4.3/utf8migrationtool	2007-01-07 18:08:48.000000000 +0100
@@ -74,7 +74,9 @@
 w['FileNameConversion'].currentEncoding = currentEncoding
 
 if w['Login'].currentEncoding != "UTF-8":
-    w['Login'].newLocale = w['Login'].currentLocale + ".UTF-8"
+    import sre
+    match = sre.match("^(.*?)(\..*)?(@.*)?$", w['Login'].currentLocale)
+    w['Login'].newLocale = match.group(1) + ".UTF-8"
 else:
     w['Login'].newLocale = w['Login'].currentLocale
 

Reply via email to