> From: Andy Wingo <wi...@pobox.com> > Just a random thought: we'll have to deal with unicode ports, and the > byte-order-mark, and read-char consuming more than a byte. But perhaps > that work can come after Guile actually supports UTF-32 internally. R6RS > is probably a good guide in this regard, cleanly distinguishing bytes > from characters, and specifying the codecs for ports.
True enough. As a first step, I've been trying to set the encoding of Guile to be Latin-1 (ISO-8859-1) explicitly, which should at least allow me to locate all the necessary to/from locale conversions. To display Latin-1 encoded strings to a UTF-8 terminal, it is necessary to have import at least some of the idea of transcoders, like R6RS suggests. But, for now, I've been working the cheapest idea: a flag that indicates if a port requires locale conversion. -Mike Gran