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



On 3/3/11 1:18 AM, Robert Dodier wrote:
> On 3/2/11, Douglas Crosher <dtc-maxima at scieneer.com> wrote:
>
>> Needless to say the use of a character offset for the Maxima info documents
>> suits the SCL, but it could also work with byte offsets,
> [...]
>> just reading a chunk of bytes and converting them to characters.
> How can that be implemented? Is there a CL function for it?
> I don't think CODE-CHAR is enough, and I don't know anything else to try.
But we're not trying to process the string so using code-char to convert
an octet to iso8859-1 is ok.

If you really want the string, most lisps have some form of the function
octets-to-string.  Cmucl has octets-to-string,  ccl has
decode-string-from-octets, clisp has convert-string-from-bytes.

Ray