--- gforth/utf-8.fs 2004/12/29 14:15:12 1.8 +++ gforth/utf-8.fs 2004/12/31 11:01:21 1.9 @@ -47,8 +47,15 @@ s" malformed UTF-8 character" exception \ plug-in so that char and ' 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' ) - 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@ \ scan to next/previous character