Changeset 14175
- Timestamp:
- 10/10/12 14:17:11 (8 years ago)
- Location:
- trunk/abcl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/doc/manual/abcl.tex
r13933 r14175 980 980 \section{Extensions to the Reader} 981 981 982 We implement a special hexadecimal escape sequence for specifying 983 characters to the Lisp reader, namely we allow a sequences of the form 984 \# \textbackslash Uxxxx to be processed by the reader as character985 whose code is specified by the hexadecimal digits ``xxxx''. The 986 hexadecimal sequence must be exactly four digits long \footnote{This 987 represents a compromise with contemporary in 2011 32bit hosting988 architecures for which we wish to make text processing efficient. 989 Should the User require more control over UNICODE processing we 990 recommend Edi Weisz' excellent work with FLEXI-STREAMS which we 991 fully support}, padded by leading zeros for values less than 0x1000.982 We implement a special hexadecimal escape sequence for specifying 32 983 bit characters to the Lisp reader\footnote{This represents a 984 compromise with contemporary in 2011 32bit hosting architecures for 985 which we wish to make text processing efficient. Should the User 986 require more control over UNICODE processing we recommend Edi Weisz' 987 excellent work with FLEXI-STREAMS which we fully support}, namely we 988 allow a sequences of the form \# \textbackslash Uxxxx to be processed 989 by the reader as character whose code is specified by the hexadecimal 990 digits ``xxxx''. The hexadecimal sequence may be one to four digits 991 long. 992 992 993 993 Note that this sequence is never output by the implementation. Instead, -
trunk/abcl/src/org/armedbear/lisp/LispCharacter.java
r13765 r14175 557 557 && lower.startsWith("u")) { 558 558 try { 559 int i = Integer.parseInt(lower.substring(1, 5), 16);559 final int i = Integer.parseInt(lower.substring(1, 5), 16); 560 560 return i; 561 561 } catch (NumberFormatException e) {}; … … 586 586 if (lower.equals("rubout")) 587 587 return 127; 588 if (lower.startsWith("u")) { 589 int length = lower.length(); 590 if (length > 1 && length < 5) { 591 try { 592 final int i = Integer.parseInt(lower.substring(1), 16); 593 return i; 594 } catch (NumberFormatException e) {}; 595 // fall through 596 } 597 } 598 588 599 // Unknown. 589 600 return -1;
Note: See TracChangeset
for help on using the changeset viewer.