On Fri, Nov 1, 2013 at 1:59 AM, Yaşar Arabacı <yasar11...@gmail.com> wrote:
> Is there a better way to handle this problem?

There is, but I don't know how easy it'll be. In Python 3, the repr of
a tuple will show Unicode strings as Unicode. :)

For what you're showing there, I'm not actually quite sure what's
going on. Is the string a Unicode string, or a byte string? If it's a
byte string (which I suspect, since it's coming up as \xfe and the
character you're showing us isn't U+00FE), then you have to worry
about encodings. If you're using it to store non-ASCII data, you
probably want to be using a Unicode string:

a = u"yaşar"

The best solution is definitely to move to Python 3, though - if you
can. Do you have much code to migrate, or are you starting fresh? Are
there any libraries/modules that you need that don't support Py3?

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to