[armedbear-cvs] r13402 - trunk/abcl/src/org/armedbear/lisp

mevenson at common-lisp.net mevenson at common-lisp.net
Thu Jul 14 15:33:56 UTC 2011


Author: mevenson
Date: Thu Jul 14 08:33:56 2011
New Revision: 13402

Log:
Fix failures of SYNTAX.SHARP-BACKSLASH.6 and SYNTAX.SHARP-BACKSLASH.7.

The #\Unnnn syntax only accepts characters with exactly four digits,
so we need to pad our names with leading zeros.

Alternatively, we could loosen the four digit restricion.

Modified:
   trunk/abcl/src/org/armedbear/lisp/LispCharacter.java

Modified: trunk/abcl/src/org/armedbear/lisp/LispCharacter.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/LispCharacter.java	Thu Jul 14 07:10:11 2011	(r13401)
+++ trunk/abcl/src/org/armedbear/lisp/LispCharacter.java	Thu Jul 14 08:33:56 2011	(r13402)
@@ -627,7 +627,8 @@
       }
 
     if (c > 255) {
-        return "U" + Integer.toString(c, 16);
+        final String result = "0000" + Integer.toString(c, 16);
+        return "U" + result.substring(result.length() - 4, result.length());
     }
         
     if (c<0) return null;




More information about the armedbear-cvs mailing list