Bugs item #3387767, was opened at 2011-08-07 14:28
Message generated for change (Tracker Item Submitted) made by eaganjr
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=114534&aid=3387767&group_id=14534
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: James Eagan (eaganjr)
Assigned to: Nobody/Anonymous (nobody)
Summary: NSLog raises exception on non-ascii text
Initial Comment:
It looks like the fix for bug ID 3085651 broke support for non-ascii (e.g., UTF8) strings for NSLog.
[Using the standard system Python in 10.7.0]
Frog:~ $ python
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from Foundation import *
>>> NSLog(u'Foo')
2011-08-07 13:22:46.578 Python[9268:1507] Foo
>>> NSLog(u'\xe9')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 0: ordinal not in range(128)
>>>
For reference, here’s the same thing using the standard system Python in 10.6.7:
Jagaroth:~ $ python
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from Foundation import *
>>> NSLog(u'Foo')
2011-08-07 13:24:14.206 Python[44733:b07] Foo
>>> NSLog(u'\xe9')
2011-08-07 13:24:27.737 Python[44733:b07] é
>>>
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=114534&aid=3387767&group_id=14534
|