lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prepare for encoding changes in Python 3 (issue 573280043 by address


From: jonas . hahnfeld
Subject: Re: Prepare for encoding changes in Python 3 (issue 573280043 by address@hidden)
Date: Mon, 25 Nov 2019 11:59:26 -0800

On 2019/11/25 02:44:20, Dan Eble wrote:
On 2019/11/24 11:47:01, hahnjo wrote:
> On 2019/11/23 16:45:17, Dan Eble wrote:
> > If an XML file is opened as a binary file, will the treatment of
> > platform-specific line endings become inconvenient for some
people?
>
> I hope it does not: Once we know it's really text, the code will
call
> decode('utf-8') as before.
>
> Do you have a specific case in mind that I should have a look at? I
tested
with
> Python 2.4 and 2.7 on Linux, and it passes a full check + doc.

Well, I don't have significant experience doing this kind of thing in
Python,
but
what I'm wondering is whether an "\n" written in to a text XML file in
binary
mode might make the XML look wrong when opened in a Windows app that
expects "\r\n".

Ah, the patch is mostly about reading XML files - I'll improve the
description.
But reading of different line endings still works,
01a-Pitches-Pitches.xml transformed by unix2dos and unix2mac leads to
identical results after processing with musicxml2ly.

https://codereview.appspot.com/573280043/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]