On Wed, Nov 24, 2010 at 7:37 AM, Alan Post <[email protected]> wrote: > > If possible, I would like to parse utf8 input. I currently have > utf8 enabled in my egg. [...] > Can anyone point me in the right direction?
Parsing is generally one of the things you get for free with utf8. Probably the only thing you need to do is *remove* the reference to the utf8 egg and everything will work. The effect of this is that parsing will work on bytes instead of characters, but the results will be the same. There may still be corner cases. If the API allows searching for individual characters, you need to check if they are non-ASCII and if so convert them into the relevant utf8 string. "Indexes" on input and output would be in terms of byte position. If you want to make this char position you have to convert once each on input and output. That's O(n), so no effect on asymptotic performance. -- Alex _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
