Hi ironpython,
Here's your Daily Digest of new issues for project "IronPython".
In today's digest:ISSUES
1. [New issue] unicode.encode() returns wrong type
----------------------------------------------
ISSUES
1. [New issue] unicode.encode() returns wrong type
http://ironpython.codeplex.com/workitem/34842
User bdarnell has proposed the issue:
"IronPython (2.7.4) has both unicode and byte strings, with str as an alias for
unicode (python 3 style) instead of bytes (as it is in cpython 2.7). So far so
good. However, the encode/decode methods for converting between the two don't
work as expected: u'\u00e9'.encode('utf8') returns the unicode string
'\xc3\xa9', instead of a byte string (bytes.decode('utf8') returns a unicode
string as expected). This means it is impossible to use isinstance(s, unicode)
to determine whether you are dealing with a unicode string that needs to be
encoded or a byte string that has already been encoded.
This isinstance pattern is used extensively in some Python libraries (e.g.
Tornado), so these libraries cannot be used with IronPython unless this is
fixed. unicode.encode() should always return byte strings. bytes.decode()
should mostly return unicode strings (which it already does) except for a few
bytes-to-bytes oddities like the base64 codec (which were removed in python 3)."
----------------------------------------------
----------------------------------------------
You are receiving this email because you subscribed to notifications on
CodePlex.
To report a bug, request a feature, or add a comment, visit IronPython Issue
Tracker. You can unsubscribe or change your issue notification settings on
CodePlex.com.
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
https://mail.python.org/mailman/listinfo/ironpython-users