Comment 14 for bug 650910

Revision history for this message
Mikko Rantalainen (mira) wrote :

I guess that code
  lc, encoding = locale.getdefaultlocale()
should be replaced with something along the lines
  lc = locale.getlocale(locale.LC_MESSAGES)
  encoding = locale.getpreferredencoding()
Note that locale.getlocale() should not be called before the process has called locale.setlocale(locale.LC_ALL, "") [which, I think, is true in this case]. If encoding is not needed, the latter call may be obviously dropped.