diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2014-05-22 09:41:44 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2014-05-22 10:22:24 +0300 |
commit | f2a80f864fe05792b1f234aa3716f2cb89b3474e (patch) | |
tree | 4b604cc8f6c2ebbfbeb4546ff0cbece41170956a /scintilla/scripts/ScintillaData.py | |
parent | 12ee3c17590032a0e93654fb6fbdeb0972b4e113 (diff) | |
download | notepad2-mod-f2a80f864fe05792b1f234aa3716f2cb89b3474e.zip notepad2-mod-f2a80f864fe05792b1f234aa3716f2cb89b3474e.tar.gz notepad2-mod-f2a80f864fe05792b1f234aa3716f2cb89b3474e.tar.bz2 |
Update Scintilla to 3.4.2.
Diffstat (limited to 'scintilla/scripts/ScintillaData.py')
-rw-r--r-- | scintilla/scripts/ScintillaData.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scintilla/scripts/ScintillaData.py b/scintilla/scripts/ScintillaData.py index bb21c22..f9c7718 100644 --- a/scintilla/scripts/ScintillaData.py +++ b/scintilla/scripts/ScintillaData.py @@ -30,7 +30,7 @@ from __future__ import with_statement -import datetime, glob, os, textwrap +import codecs, datetime, glob, os, sys, textwrap import FileGenerator @@ -118,7 +118,7 @@ def FindPropertyDocumentation(lexFile): def FindCredits(historyFile): credits = [] stage = 0 - with open(historyFile) as f: + with codecs.open(historyFile, "r", "utf-8") as f: for l in f.readlines(): l = l.strip() if stage == 0 and l == "<table>": @@ -136,7 +136,7 @@ def FindCredits(historyFile): if credit: credit += " " credit += name + " " + url - credits.append(credit.decode("utf-8")) + credits.append(credit) return credits def ciCompare(a,b): @@ -219,4 +219,7 @@ if __name__=="__main__": subsequent_indent=" ")) print("Credits:") for c in sci.credits: - print(" " + c.encode("utf-8")) + if sys.version_info[0] == 2: + print(" " + c.encode("utf-8")) + else: + sys.stdout.buffer.write(b" " + c.encode("utf-8") + b"\n") |