Re: Unicode lambda Per Bothner 12 May 2019 14:17 UTC

On 5/12/19 5:23 AM, Lassi Kortela wrote:
> The 'read' procedure that looks for the encoding declaration should be a special reader that's much simpler than the normal Scheme reader and handles encoding errors gracefully (perhaps it should simply read raw bytes from a binary port, treat 0..127 as ASCII characters, and ignore all other characters or treat them as whitespace or symbol/string constituent).

Kawa checks for the regex "coding[:=]\\s*([-a-zA-Z0-9]+)"
while parsing a comment in the first two lines of a file.

Search for 'checkEncodingSpec' in the source.

Kawa also checks for a byte-order-mark.
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/