chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] string-translate and utf-8


From: felix winkelmann
Subject: Re: [Chicken-users] string-translate and utf-8
Date: Fri, 7 Nov 2008 11:41:43 +0100

On Sun, Nov 2, 2008 at 1:40 PM, Sunnan <address@hidden> wrote:
> I'm updating old code that used to work:
>
> (require-extension syntax-case utf8 srfi-1 utf8-srfi-13 miscmacros)
>
> ;(import utf8)
> ;(import utf8-srfi-13) ;(commented out since they're not needed anymore?)
> (use utf8-srfi-13)  ;(I've tried with and without this line)
>
> (string-translate " i " "ö " "o_") ;; this should eval to "_i_"
>
>
> but i get Error: (vector-ref) out of range, I guess because it reads the
> multi-byte characters (i.e. #\ö) as multiple entries in the vector.
>

Hi! (Sorry for the late reply)

I'm currently not up to date with the state of the utf8 extension.
AFAIK, Alex "un-modularized" it (so the import-statements should
indeed not be needed anymore). Is "string-translate" provided
by utf8-srfi-13? It's not a srfi-13 routine, it belongs to the core
libraries. It could be possible that the old version of utf8 hooked
deeper into library code to make string-translate work, and that
the new one doesn't, but I can't really say.


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]