[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: cp-tools/src/gnu/classpath/tools/native2ascii/Native2A
From: |
Ito Kazumitsu |
Subject: |
[cp-patches] FYI: cp-tools/src/gnu/classpath/tools/native2ascii/Native2ASCII.java |
Date: |
Sat, 31 Dec 2005 00:23:49 +0900 (JST) |
This fixes the bug #25570.
Index: cp-tools/ChangeLog
===================================================================
RCS file: /cvsroot/classpath/cp-tools/ChangeLog,v
retrieving revision 1.45
diff -u -r1.45 ChangeLog
--- cp-tools/ChangeLog 2 Aug 2005 17:56:50 -0000 1.45
+++ cp-tools/ChangeLog 30 Dec 2005 15:13:14 -0000
@@ -1,3 +1,9 @@
+2005-12-30 Ito Kazumitsu <address@hidden>
+
+ Fixes bug #25570
+ * src/gnu/classpath/tools/native2ascii/Native2ASCII.java(main):
+ Fixed bugs in char to hex string conversion.
+
2005-08-02 Archit Shah <address@hidden>
* src/gnu/classpath/tools/rmi/rmic/RMIC.java: Centralize calls to
System.exit and make handling of error conditions more uniform.
Index: cp-tools/src/gnu/classpath/tools/native2ascii/Native2ASCII.java
===================================================================
RCS file:
/cvsroot/classpath/cp-tools/src/gnu/classpath/tools/native2ascii/Native2ASCII.java,v
retrieving revision 1.1
diff -u -r1.1 Native2ASCII.java
--- cp-tools/src/gnu/classpath/tools/native2ascii/Native2ASCII.java 30 Jan
2005 04:19:27 -0000 1.1
+++ cp-tools/src/gnu/classpath/tools/native2ascii/Native2ASCII.java 30 Dec
2005 15:13:15 -0000
@@ -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
+}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: cp-tools/src/gnu/classpath/tools/native2ascii/Native2ASCII.java,
Ito Kazumitsu <=