more about build-index+cl-ppcre branch & encodings



On 3/2/11, Raymond Toy <toy.raymond at gmail.com> wrote:
> On 3/2/11 4:29 PM, Robert Dodier wrote:
>> OK, when I launch xterm with
>> LC_ALL=foo LANG=foo xterm
>> and then run Maxima 5.21.1 in that, describe text
>> (titles and content) is displayed correctly in both
>> ISO-8859 and UTF-8 locales.
>>
>> What was Ray's original proposal? I don't remember.
> I think Leo is referring to my comment about treating the info files as
> streams of octets.  You mentioned earlier that this is how the existing
> system works.

OK, I remember now.

For the record, the current implementation does not treat
the info text as a byte stream.
First it seeks to a byte offset, then it reads a number of characters.
The business about seeking to a byte offset works because
some Lisps interpret the argument of FILE-POSITION as a byte offset
even if the stream is a character stream.

There is no guarantee in the CLHS that FILE-POSITION is obliged
to interpret its argument as a byte offset, although there is
some suggestive language to that effect.
At any rate, the Lisps that I've tried act that way.

best

Robert Dodier