Don Cohen writes:
> Pascal J.Bourguignon writes:
> > You can fetch a compiled binary with fink, but the latest version
> > available is 2.29 while we're at 2.33.
> I eventually managed to do this ...
> > Anyway, a computer without a compiler IS NOT a computer.
> > Go and install the developer tools!
> You imagine it's my computer!
> Anyhow, it now has a lisp compiler.
> Now I'm trying to use foreign characers.
> I see the characters on the screen and can even read and write them
> on files.
> But when I ask the length of a string I get 2 x the number of
> characters, i.e., the number of bytes. Is that the way it's supposed
> to work? (Or related to 2.29 instead of 2.33 ?)
> When I ask for individual characters I always get 8 bit characters.
First, check if clisp 2.29 from fink has been compiled with unicode support:
(MEMBER :UNICODE *FEATURES*) shoud not be NIL.
Then you should launch clisp with one ore more -E options specifying
the encoding(s) you want to use, or set the encoding custom variables:
For example, to work in ISO-8895-1 encoding
(no need for unicode support in that case):
clisp -ansi -q -K full -m 32M -I -E ISO-8859-1
to work in UTF-8 (unicode) encoding, but with files names encoded in
clisp -ansi -q -K full -m 32M -I -E UTF-8 -Efile ISO-8859-1
To read a line from a japanese unix file:
(with-open-file (jp-in "japanese.iso2022-jp" :direction :input
(print (read-line jp-in)))
There is no worse tyranny than to force a man to pay for what he doesn't
want merely because you think it would be good for him.--Robert Heinlein