On Tue, 2009-05-26 at 00:22 +0200, Ludovic Courtès wrote: > Hello, > > Just a bit of cosmetic nitpicking: > > > * test-suite/tests/encoding_utf8.test: new > > Please use hyphens instead of underscores in file names, for > consistency.
OK > > > +(setlocale LC_ALL "en_US.utf8") > > [...] > > > +(setencoding "ASCII") > > [...] > > > +(setencoding "ISO-8859-7") > > Do these modify the encoding used by the underlying port? If so, I'd > rather explicitly use a fluid, as is done for `current-reader'. For now, I have only one global port encoding. So setlocale, setencoding modify all subsequent port I/O. > > However, this relies on eval-after-read semantics. That is, if the > whole file is read at once, *then* evaluated, that won't work, right? The reader needs to know the encoding of a file by reading the file. The way I have it set up right now source gets evaluated sequentially and the reader changes encoding when setlocale or setencoding is encountered. Kludgy, but, simple. I think Python sets the source encoding using a magic comment. That's another way to go: have the reader scan the comment blocks for a magic comment before trying to evaluate the file. > > > +(setlocale LC_ALL "es_MX.ISO-8859-1") > > Not everyone has this locale. ;-) Viva la raza! > > > +(with-test-prefix > > + "internal encoding" > > + > > + (pass-if "ultima" > > + (string=? s1 (string-ints #xfa #x6c #x74 #x69 #x6d #x61))) > > Please indent as is done in other files. OK > > Thanks! > Ludo'. Thanks, Mike