Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

Even if you encode the Unicode default for output, the user can not specify the 
same value, unless you use custom converter. For example, if you encode u"早上好" 
as string "\xe6\x97\xa9\xe4\xb8\x8a\xe5\xa5\xbd" (in UTF-8), the user can only 
specify the argument as a 8-bit string "\xe6\x97\xa9\xe4\xb8\x8a\xe5\xa5\xbd" 
which differs from a Unicode string u"早上好".

Even if you use a custom converter which decodes 8-bit strings to Unicode, it 
makes sense to specify the default value as encoded string, because it will be 
pass to the converter.

Non-ascii unicode values never supported as default values. This issue is 
rather a feature request than a bug report. It is too late to add new features 
in 2.7. The right solution is to upgrade to Python 3. Eventually, solving 
similar issues was one of purposes of creating Python 3.

----------

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

Reply via email to