encode('utf-7') returns different results against CPython
encode('utf-7') returns different results with simbols:
! @ # $ % ^ & * { } [ ] _
i.e. u'!#'.encode('utf-7')
It also return different results when the unicode is ended with simbols:
. , : ; ?
i.e. u'u\000:'.encode('utf-7')
IronPython:
E:\workfolder\ironpythonCompatableFor2.5\25\Lib>ipy
IronPython console: IronPython 2.0A6 (2.0.11102.00) on .NET 2.0.50727.832
Copyright (c) Microsoft Corporation. All rights reserved.
u'u\000:'.encode('utf-7')
'u+AAA-:'
u'!#'.encode('utf-7')
'+ACEAIw-'
^Z
CPython:
E:\workfolder\ironpythonCompatableFor2.5\25\Lib>python
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]
on
win32
Type ";help";, ";copyright";, ";credits"; or ";license"; for more information.
u'u\000:'.encode('utf-7')
'u+AAA:'
u'!#'.encode('utf-7')
'!#'
Work Item Details
Original CodePlex Issue: Issue 23839 Status: Active Reason Closed: Unassigned Assigned to: Unassigned Reported on: Jul 27, 2009 at 11:59 PM Reported by: dfugate Updated on: Feb 22, 2013 at 2:12 AM Updated by: jdhardy Custom value: Reported internally at Microsoft. Test: test_unicode.py CreatedDate: 11/20/2007 NewInternalID: 409652 OldInternalID: 322765 AreaPath: IronPython\Runtime