diff options
Diffstat (limited to 'tool')
-rw-r--r-- | tool/unicode_norm_gen.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tool/unicode_norm_gen.rb b/tool/unicode_norm_gen.rb index 982f3f077c..7fceaefb03 100644 --- a/tool/unicode_norm_gen.rb +++ b/tool/unicode_norm_gen.rb @@ -14,10 +14,10 @@ class Integer def to_UTF8() # convert to string, taking legibility into account if self>0xFFFF "\\u{#{to_s(16).upcase}}" - elsif CombiningClass[self] or self=='\\'.ord or self=='"'.ord + elsif self>0x7f "\\u#{to_s(16).upcase.rjust(4, '0')}" else - chr Encoding::UTF_8 + chr.sub(/[\\\"]/, '\\\&') end end end @@ -136,7 +136,7 @@ end.line_slice "\n " # generate normalization tables file open("#{OuputDataDir}/normalize_tables.rb", "w").print <<MAPPING_TABLE_FILE_END -# coding: utf-8 +# coding: us-ascii # automatically generated by tool/unicode_norm_gen.rb |