Martin v. Löwis <mar...@v.loewis.de> added the comment:

This is not a bug, but intentional.

a is a Unicode string; it does not have an encoding internally (not GBK, not 
UTF-8). Then, the string being exec'ed also becomes a Unicode string. exec'ing 
Unicode strings is confusing; try to avoid this. The semantics of exec'ing a 
Unicode string is that all str (but not unicode) literals get encoded as UTF-8.

To see the result you expect, write

a = "麓贸"

----------
nosy: +loewis
resolution:  -> invalid
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10187>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to