guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Guile-commits] GNU Guile branch, string_abstraction2, updated. 823e


From: Mike Gran
Subject: Re: [Guile-commits] GNU Guile branch, string_abstraction2, updated. 823e444052817ee120d87a3575acb4f767f17475
Date: Mon, 25 May 2009 16:14:13 -0700

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]