From aaa55df26b1b6d9ffeaa624be003dbc89c850ff4 Mon Sep 17 00:00:00 2001 From: Andy Heninger Date: Thu, 29 Jul 2010 00:18:28 +0000 Subject: [PATCH] ICU-6015 add svn:mime-type charset tags. X-SVN-Rev: 28384 --- icu4c/source/tools/icu-svnprops-check.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/icu4c/source/tools/icu-svnprops-check.py b/icu4c/source/tools/icu-svnprops-check.py index 6ea856bf046..f2391789c58 100755 --- a/icu4c/source/tools/icu-svnprops-check.py +++ b/icu4c/source/tools/icu-svnprops-check.py @@ -162,7 +162,7 @@ def check_utf8(file_name, base_mime_type, actual_mime_type): if all(ord(byte) < 128 for byte in bytes): # pure ASCII. - print "Pure ASCII " + file_name + # print "Pure ASCII " + file_name return base_mime_type try: @@ -171,7 +171,10 @@ def check_utf8(file_name, base_mime_type, actual_mime_type): print "warning: %s: not ASCII, not UTF-8" % file_name return base_mime_type - # Append charset=utf-8. Need to escape the ';' because it is ultimately going to a shell. + if ord(bytes[0]) != 0xef: + print "UTF-8 file with no BOM: " + file_name + + # Append charset=utf-8. Need to escape the ';' because it is ultimately going to a shell. return base_mime_type + '\\;charset=utf-8'