1
Vote

different prints for u'\xa0' against python2.7.3

description

u\xa0 should be a white space:
 
== python 2.7.3 ==
 
Python 2.7.3 (default, Aug  1 2012, 05:14:39)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> fn=u'\xa0'
>>> print fn
 
>>>
 
== IronPython 2.7.3 ==
IronPython 2.7.3 (2.7.0.40) on .NET 4.0.30319.269 (32-bit)
Type "help", "copyright", "credits" or "license" for more information.
>>> fn=u'\xa0'
>>> print fn
?
>>> 
it was translated to a '?' in ironpython

comments

paweljasinski wrote Jun 29 at 4:14 PM

With my current settings and 2.7.4 alpha 1 I am getting expected results:
c:\github\IronLanguages\Languages\IronPython>ipy
IronPython 2.7.4a2 DEBUG (2.7.0.40) on .NET 4.0.30319.296 (32-bit)
Type "help", "copyright", "credits" or "license" for more information.
>>> nbsp='\xa0'
>>> print nbsp

>>> print len(nbsp)
1
>>> nbsp
u'\xa0'
>>> import locale
>>> locale.getdefaultlocale()
('en_US', 'cp1252')