Permalink
Browse files

Make the locale info dumping Java code Python3-aware

  • Loading branch information...
1 parent e61a8fd commit 97dbfaf189e7a11e625e49de5d8529f50ed5767b @daviddrysdale committed Nov 12, 2011
Showing with 9 additions and 5 deletions.
  1. +3 −4 do3
  2. +6 −1 python/DumpLocale.java
View
7 do3
@@ -23,8 +23,7 @@ rm -f *.bak
cd ..
cd ..
-sed 's/^PYTHON=python$/PYTHON=python3.2/' makefile > tmp
-mv tmp makefile
+sed -i '' 's/^PYTHON=python$/PYTHON=python3.2/' makefile
+sed -i '' 's/python3 = false/python3 = true/' DumpLocale.java
-make geodata
-make metadata
+make geodata metadata locale
View
@@ -9,10 +9,15 @@
class DumpLocale {
private static final char SINGLE_QUOTE = 39;
private static final char[] hexChar = {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
+ private static boolean python3 = false;
/* Print a Unicode name suitably escaped */
private static void printName(String name) {
- System.out.print("u'");
+ if (python3) {
+ System.out.print("'");
+ } else {
+ System.out.print("u'");
+ }
// Need to escape unicode data
for (int ii=0; ii<name.length(); ii++) {
char c = name.charAt(ii);

0 comments on commit 97dbfaf

Please sign in to comment.