From: Jeroen Ruigrok van der Werven (asmodai@in-nomine.org)
Date: Fri Dec 28 2007 - 14:16:18 CST
It turns out this is a problem on all Unix systems using ncurses past version
5.3.
As of version 5.4 and later you need a setlocale() call first. Within Python
this is equivalent to:
import locale
locale.setlocale(locale.LC_ALL, '')
After that you can do something like:
code = locale.getpreferredencoding()
And use code's value in the string.encode() method as encoding parameter.
-- Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai イェルーン ラウフロック ヴァン デル ウェルヴェン http://www.in-nomine.org/ | http://www.rangaku.org/ In every stone sleeps a crystal...
This archive was generated by hypermail 2.1.5 : Fri Dec 28 2007 - 14:20:50 CST