Subject: Re: bug#18520: string ports should not have an encoding

From: David Kastrup <[email-masked]>
Date: Tue, 23 Sep 2014 11:00:25 +0200

[email-masked] (Ludovic Courtès) writes:

> David Kastrup <[email-masked]> skribis:
>
>> [email-masked] (Ludovic Courtès) writes:
>>
>>> David Kastrup <[email-masked]> skribis:
>>>>
>>>> For error messages, yes.  For associating a position in a string with a
>>>> previously parsed closure, no.
>>>
>>> But wouldn’t a line/column pair be as suitable as a unique identifier as
>>> the position in the file?
>>
>> As long as the reencoded UTF-8 is byte-identical to the original.
>
> Sorry, what do you mean by “reencoded UTF-8”?  The internal string port
> buffer?

Sure.  That's where ftell gets its info from.

> Line/column info remains identical regardless of the encoding, so I tend
> to think it’s more robust to use that.

Column info remains identical regardless of the encoding?  Since when?

-- 
David Kastrup