On 2009-07-03 13:24:59 +0200, Susanne Oberhauser wrote:
Michal Čihař
writes: 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?
Hmm IMHO this is just a workaround which doesn't really fix the problem. The problem is that our implementation of __str__() is wrong in the sense of the return "type". We need to ensure that everything __str__() returns can be converted to the str type. For all other cases we should use __unicode__() but then there might be cases where "print obj" doesn't print out the expected result because print doesn't use __unicode__()... Actually my main "concern" with your workaround is that it will break other applications which use osc and rely on the correctness of __str__(). This all seems to be quite complicated:) Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org