|
Encoding preparations for Python 3.5
1. Use codecs.open() to decode as utf-8
This is in preparation for Python 3.5 where the default encoding
depends on the value of the LANG environment variable. As far as
I can tell, this was changed later on and at least Python 3.7 and
version 3.8 always default to 'utf-8' on Linux. As I'm proposing to
make Python 3.5 the required minimum, we can't rely on this and need
to force 'utf-8' when reading files that could contain Unicode.
2. musicxml2ly: Correct usage of codecs module
sys.stdout is already in lilylib and codecs.open() always opens
a file in binary mode.
3. lilylib: Remove encoded_write
It's not needed anymore as sys.stdout and sys.stderr are wrapped
with encoding writers. (The argument file for show_rules in script
convert-ly is also sys.stdout.)
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+43 lines, -35 lines) |
Patch |
 |
M |
python/book_snippets.py
|
View
|
|
3 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
python/book_texinfo.py
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
python/lilylib.py
|
View
|
|
2 chunks |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
scripts/build/bib2texi.py
|
View
|
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
scripts/build/extract_texi_filenames.py
|
View
|
|
3 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
scripts/build/lilypond-words.py
|
View
|
|
4 chunks |
+6 lines, -5 lines |
0 comments
|
Download
|
 |
M |
scripts/build/makesnippets.py
|
View
|
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
scripts/build/output-distance.py
|
View
|
|
3 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
scripts/build/texi2omf.py
|
View
|
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
 |
M |
scripts/build/www_post.py
|
View
|
|
2 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
scripts/convert-ly.py
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
scripts/lilypond-book.py
|
View
|
|
4 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
scripts/midi2ly.py
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
scripts/musicxml2ly.py
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 1
|