version 1.8, 2004/12/29 14:15:12
|
version 1.9, 2004/12/31 11:01:21
|
Line 47 s" malformed UTF-8 character" exception
|
Line 47 s" malformed UTF-8 character" exception
|
|
|
\ plug-in so that char and '<char> work for UTF-8 |
\ plug-in so that char and '<char> work for UTF-8 |
|
|
|
[ifundef] char@ \ !! bootstrapping help |
|
Defer char@ ( addr u -- char addr' u' ) |
|
:noname over c@ -rot 1 /string ; IS char@ |
|
[then] |
|
|
:noname ( addr u -- char addr' u' ) |
:noname ( addr u -- char addr' u' ) |
dup 1 u<= IF defers char@ EXIT THEN |
\ !! the if here seems to work around some breakage, but not |
|
\ entirely; e.g., try 'ç' with LANG=C. |
|
dup 1 u<= IF defers char@ EXIT THEN |
over + >r u8@+ swap r> over - ; IS char@ |
over + >r u8@+ swap r> over - ; IS char@ |
|
|
\ scan to next/previous character |
\ scan to next/previous character |