[r6rs-discuss] BOM at start of ports
Abdulaziz Ghuloum
aghuloum at cs.indiana.edu
Wed Dec 5 05:54:56 EST 2007
I can't find this in the spec. For textual ports obtained using open-
file-input-port, open-bytevector-input-port, and transcoded-port, is
the first call to get-char/peek-char supposed to recognize a BOM if
it exists in the beginning of the port buffer, or should a BOM, if
one exists, be decoded as a regular character?
The answer, I suppose, is one of:
1. Must recognize the BOM and use it.
2. Must recognize the BOM and drop it.
3. Must decode the BOM as if it were a regular character.
4. Any of the above.
A related question is about the endianness of the data read when
using the (utf-16-codec) in a transcoder that's passed to any of the
procedures listed above. Should the BOM, if one exists, be used to
determine the endianness of the data in the port?
Thanks.
Aziz,,,
More information about the r6rs-discuss
mailing list