From f9919d7018f9ba19e5ac4d15ce85153ba4e73eb0 Mon Sep 17 00:00:00 2001 From: Mike FABIAN Date: Mon, 16 Feb 2015 07:43:50 +0100 Subject: [PATCH] Reduce whitespace changes to the original UTF-8 file --- utf8_gen.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utf8_gen.py b/utf8_gen.py index 9ffb7f6..9e752bd 100755 --- a/utf8_gen.py +++ b/utf8_gen.py @@ -57,7 +57,7 @@ def process_range(start, end, outfile, name): # # So we expand the Hangul Syllables here: for i in range(int(start, 16), int(end, 16)+1 ): - outfile.write('{:s} {:s} {:s}\n'.format( + outfile.write('{:<11s} {:<12s} {:s}\n'.format( ucs_symbol(i), convert_to_hex(i), name)) return # UnicodeData.txt file has contains code point ranges like this: @@ -73,13 +73,13 @@ def process_range(start, end, outfile, name): # .. /xe4/xb6/x80 for i in range(int(start, 16), int(end, 16), 64 ): if i > (int(end, 16)-64): - outfile.write('{:s}..{:s} {:s} {:s}\n'.format( + outfile.write('{:s}..{:s} {:<12s} {:s}\n'.format( ucs_symbol(i), ucs_symbol(int(end,16)), convert_to_hex(i), name)) break - outfile.write('{:s}..{:s} {:s} {:s}\n'.format( + outfile.write('{:s}..{:s} {:<12s} {:s}\n'.format( ucs_symbol(i), ucs_symbol(i+63), convert_to_hex(i), @@ -146,7 +146,7 @@ def process_charmap(flines, outfile): # the original UTF-8 file in glibc had them as # comments, so we keep these comment lines. outfile.write('%') - outfile.write('{:s} {:s} {:s}\n'.format( + outfile.write('{:<11s} {:<12s} {:s}\n'.format( ucs_symbol(int(fields[0], 16)), convert_to_hex(int(fields[0], 16)), fields[1]))