[R6RS] Source code encoding

Michael Sperber sperber
Tue Mar 15 08:33:19 EST 2005

>>>>> "Marc" == Marc Feeley <feeley at IRO.UMontreal.CA> writes:

Marc> I understand your arguments, but don't agree with your conclusions.

I feel the same way :-)

Marc> Which decoders are you refering to?  Are these really
Marc> widespread? 

Anything based on the author looking at Gillam's book, which has a
table "If the file starts with ..., it's ...".  Part of the problem
for me is that I have a poor sense as to what Unicode tools are out
there.  But the same holds true for the other side of the equation,
namely how many tools we care about don't support UTF-8.

>> - Because the perceived (by me) complexity.

Marc> You mean implementation complexity?  

No, I meant issue complexity.

Marc> How about:

Marc> (define (determine-encoding port)
Marc>   (case (peek-byte port)
Marc>      ((#xFE #xFF) 'UTF-16+BOM)
Marc>      ((#xEF)      'UTF-8+BOM)
Marc>      (else        'UTF-8)))

Does *this exact* code actually work in Gambit-C?

Cheers =8-} Mike
Friede, V?lkerverst?ndigung und ?berhaupt blabla

More information about the R6RS mailing list