From beeac2153f3de64644816baf64c9fe24747131cb Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Thu, 4 Feb 2010 09:58:48 +0000 Subject: [PATCH] Used replace parameter in Windows for encodeing problem with strange characters. svn: r14206 --- src/Utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utils.py b/src/Utils.py index 506356b21..8bae13f4c 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -280,7 +280,7 @@ if platform.system() in WINDOWS: #so no need to specify it conv_utf8_tosrtkey_ongtk = lambda x: locale.strxfrm(unicode(x).encode( codeset)) - conv_unicode_tosrtkey_ongtk = lambda x: locale.strxfrm(x.encode(codeset)) + conv_unicode_tosrtkey_ongtk = lambda x: locale.strxfrm(x.encode(codeset),'replace') else: # on unix C functions need to recieve utf-8. Default conversion would # use ascii, so it is needed to be explicit about the resulting encoding