convert/gnuarch: set prefered locale for str conversions
authorEdouard Gomez <ed.gomez@free.fr>
Sun, 04 Jan 2009 02:36:48 +0100
changeset 7579 a8db971dc258
parent 7578 7971650bdc73
child 7580 8c5afb3cdb67
convert/gnuarch: set prefered locale for str conversions Seems necessary, as a test on my archives goes further with this.
hgext/convert/gnuarch.py
--- a/hgext/convert/gnuarch.py	Sun Jan 04 02:36:48 2009 +0100
+++ b/hgext/convert/gnuarch.py	Sun Jan 04 02:36:48 2009 +0100
@@ -3,7 +3,7 @@
 from common import NoRepo, commandline, commit, converter_source
 from mercurial.i18n import _
 from mercurial import util
-import os, shutil, tempfile, stat
+import os, shutil, tempfile, stat, locale
 from email.Parser import Parser
 
 class gnuarch_source(converter_source, commandline):
@@ -48,6 +48,7 @@
         self.tags = {}
         self.modecache = {}
         self.catlogparser = Parser()
+        self.locale = locale.getpreferredencoding()
 
     def before(self):
         if self.execmd == 'tla':