IMO this is a bug in xorgconfig.py. Note that in one place it does:
try: loc = locale.getpreferredencoding() except locale.Error: loc = 'ANSI_X3.4-1968'
... while in the offending function it does:
def writeConfig(self,filename): fhandle = codecs.open(filename,'w',locale.getpreferredencoding()) fhandle.write(self.toString()) fhandle.close()
I suggest this code instead to match the first segment I quoted:
def writeConfig(self,filename): try: encoding = locale.getpreferredencoding() except locale.Error: encoding = 'ANSI_X3.4-1968' fhandle = codecs.open(filename,'w',encoding) fhandle.write(self.toString()) fhandle.close()
IMO this is a bug in xorgconfig.py. Note that in one place it does:
try: getpreferredenc oding()
loc = locale.
except locale.Error:
loc = 'ANSI_X3.4-1968'
... while in the offending function it does:
def writeConfig( self,filename) : open(filename, 'w',locale. getpreferredenc oding() )
fhandle. write(self. toString( ))
fhandle. close()
fhandle = codecs.
I suggest this code instead to match the first segment I quoted:
def writeConfig( self,filename) :
encoding = locale. getpreferredenc oding()
encoding = 'ANSI_X3.4-1968' open(filename, 'w',encoding)
fhandle. write(self. toString( ))
fhandle. close()
try:
except locale.Error:
fhandle = codecs.