Michal Čihař
There is thre fixes to this:
1. we enable in syte.py the use of the locale setting
Problem with this is that you will most likely break applications which do rely on default settings.
yes.
2. we work around the IMNSHO braindead disablement of "setdefaultencoding":
import sys, locale reload(sys) sys.setdefaultencoding(locale.getdefaultlocale()[1])
3. We scatter explicit unicode awareness to every place we possibly handle unicode strings strings.
I *strongly* opt for #1 or #2. #3 is just so plain inelegant, I refuse to do that. It's like checking return codes after exceptions have been invented.
4. Wait for python 3.0 :-).
ok, that means #2 for now, right? 1 froh@byron:/tmp $ rcsdiff -u /usr/bin/osc =================================================================== RCS file: /usr/bin/osc,v retrieving revision 1.1 diff -u -r1.1 /usr/bin/osc --- /usr/bin/osc 2009/07/03 11:20:56 1.1 +++ /usr/bin/osc 2009/07/03 11:22:39 @@ -3,7 +3,14 @@ # this wrapper exists so it can be put into /usr/bin, but still allows the # python module to be called within the source directory during development -import sys + +import sys, locale +# this is a hack to make osc work as expected with utf-8 characters, no matter +# how site.py is set... +reload(sys) +sys.setdefaultencoding(locale.getdefaultlocale()[1]) +del sys.setdefaultencoding + from osc import commandline from osc import babysitter This fixes the problem for me. S. -- Susanne Oberhauser +49-911-74053-574 SUSE -- a Novell Business OPS Engineering Maxfeldstraße 5 Processes and Infrastructure Nürnberg SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org