[ python-Bugs-1305706 ] windows unicode write is messing up the EOL.

SourceForge.net noreply at sourceforge.net
Tue Sep 27 12:43:18 CEST 2005


Bugs item #1305706, was opened at 2005-09-27 13:43
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1305706&group_id=5470

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: Windows
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Istvan Visegradi (visike)
Assigned to: Nobody/Anonymous (nobody)
Summary: windows unicode write is messing up the EOL.

Initial Comment:
User has an Unicode UTF-16 input file and trys to read
it line-by-line and write it back to a new file.
With the read line the program does nothing.
code example: 
...
ln=fi.readline()
fo.write(ln)
...

In linux this code works perfectly with the input
UTF-16 type file.
In windows Python put an extra \x0D into the EOL.

EOL should look like: 0D 00 0A 00
In windows it will be: 0D 00 0D 0A 00

Please inform when correction is available.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1305706&group_id=5470


More information about the Python-bugs-list mailing list