[kaffe] CVS kaffe (kaz): tools/javatools/javalib/gnu/classpath/tools/native2ascii/Native2ASCII.java:

Kaffe CVS cvs-commits at kaffe.org
Fri Dec 30 16:37:38 PST 2005


PatchSet 7068 
Date: 2005/12/31 00:31:36
Author: kaz
Branch: HEAD
Tag: (none) 
Log:
2005-12-31  Ito Kazumitsu  <kaz at maczuka.gcd.org>

        * tools/javatools/javalib/gnu/classpath/tools/native2ascii/Native2ASCII.java:
        Copied from GNU Classpath (some bugs fixed).

Members: 
	ChangeLog:1.4587->1.4588 
	tools/javatools/javalib/gnu/classpath/tools/native2ascii/Native2ASCII.java:1.1->1.2 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4587 kaffe/ChangeLog:1.4588
--- kaffe/ChangeLog:1.4587	Fri Dec 30 18:38:46 2005
+++ kaffe/ChangeLog	Sat Dec 31 00:31:36 2005
@@ -1,3 +1,8 @@
+2005-12-31  Ito Kazumitsu  <kaz at maczuka.gcd.org>
+
+	* tools/javatools/javalib/gnu/classpath/tools/native2ascii/Native2ASCII.java:
+	Copied from GNU Classpath (some bugs fixed).
+
 2005-12-30  Guilhem Lavaux  <guilhem at kaffe.org>
 
 	* config/config-std.h: Include config-int.h before everything
Index: kaffe/tools/javatools/javalib/gnu/classpath/tools/native2ascii/Native2ASCII.java
diff -u kaffe/tools/javatools/javalib/gnu/classpath/tools/native2ascii/Native2ASCII.java:1.1 kaffe/tools/javatools/javalib/gnu/classpath/tools/native2ascii/Native2ASCII.java:1.2
--- kaffe/tools/javatools/javalib/gnu/classpath/tools/native2ascii/Native2ASCII.java:1.1	Wed Oct 19 20:17:02 2005
+++ kaffe/tools/javatools/javalib/gnu/classpath/tools/native2ascii/Native2ASCII.java	Sat Dec 31 00:31:41 2005
@@ -81,13 +81,18 @@
             for (int i = 0; i < s.length(); i++)
               {
                 char c = s.charAt(i);
-                if (c <= 0xff)
+                if ((int)c <= 127)
                   {
                     sb.append(c);
                   }
                 else
                   {
-                    sb.append("\\u" + Integer.toHexString((int) c));
+                    sb.append("\\u");
+                    if ((int)c <= 0xff)
+                      sb.append("00");
+                    else if ((int)c <= 0xfff)
+                      sb.append("0");
+                    sb.append(Integer.toHexString((int) c));
                   }
               }
             wtr.println(sb.toString());
@@ -101,4 +106,4 @@
         e.printStackTrace();
       }
   }
-}
\ No newline at end of file
+}




More information about the kaffe mailing list