Encoding according to sys.getfilesystemencoding() in stead of hardcoded iso-8859-1

svn: r9958
This commit is contained in:
Peter Landgren 2008-01-29 18:18:45 +00:00
parent bbd8b9fcb8
commit e7b15b8aa5
2 changed files with 6 additions and 2 deletions

View File

@ -28,6 +28,7 @@
#
#-------------------------------------------------------------------------
import os
import sys
from time import localtime
from gettext import gettext as _
@ -193,7 +194,8 @@ class CalendarWriter:
self.flist[family_handle] = 1
def writeln(self, text):
self.g.write('%s\n' % (text.encode('iso-8859-1')))
#self.g.write('%s\n' % (text.encode('iso-8859-1')))
self.g.write('%s\n' % (text.encode(sys.getfilesystemencoding())))
def export_data(self, filename):

View File

@ -28,6 +28,7 @@
#
#-------------------------------------------------------------------------
import os
import sys
from gettext import gettext as _
#------------------------------------------------------------------------
@ -171,7 +172,8 @@ class CardWriter:
self.plist[p] = 1
def writeln(self, text):
self.g.write('%s\n' % (text.encode('iso-8859-1')))
#self.g.write('%s\n' % (text.encode('iso-8859-1')))
self.g.write('%s\n' % (text.encode(sys.getfilesystemencoding())))
def export_data(self, filename):