commit | 63be8a99401992075c23e99f7c84de1c653e39e2 | [log] [tgz] |
---|---|---|
author | Christian Clauss <cclauss@me.com> | Wed Jan 27 15:08:05 2021 +0100 |
committer | GitHub <noreply@github.com> | Wed Jan 27 15:08:05 2021 +0100 |
tree | 85dc7014316dc27bb9a6da3af4dc01c35ab02219 | |
parent | 2a51a85aa86abb4c294c65fab57f3d9c69f10080 [diff] |
unichr was removed in Python 3 because all str are Unicode (#877) https://python-future.org/compatible_idioms.html#unichr
diff --git a/scripts/dictionary/step-04-generate-java-literals.py b/scripts/dictionary/step-04-generate-java-literals.py index fd3c64e..c235f25 100644 --- a/scripts/dictionary/step-04-generate-java-literals.py +++ b/scripts/dictionary/step-04-generate-java-literals.py
@@ -15,6 +15,11 @@ # # This script generates literals used in Java code. +try: + unichr # Python 2 +except NameError + unichr = chr # Python 3 + bin_path = "dictionary.bin" with open(bin_path, "rb") as raw: