Getting the "lengh" of a UTF-8 string is not entirely trivial, either, because UTF-8 is a variable length encoding. One the other hand, it's not that bad, and I suspect $L ends up doing a linear scan, anyway (unless strings are internally encoded with their length in bytes). If strings are not very long, I suspect it wouldn't be too bad.
--- Jim Self <[EMAIL PROTECTED]> wrote: > Bhaskar, > I think Mano was referring to the handling of strings with UTF-8 > encoding. That is what > his linux desktop was configured for at the beginning of the > discussion. When he would > type into a terminal with GTM (or without, I presume), the greek > characters would be > entered as two bytes. Not a bug, but since $L() and other intrinsic > functions currently > assume one-byte characters, multi-byte characters would have to be > handled with extrinsic > functions. > > >On Sun, 2005-04-24 at 05:27 +0300, Doctor Bones wrote: > >> Thank you Bhaskar, > >> and I did in fact notice the problem with $L() in GTM. > > > >[KSB] Mano, what exactly do you mean by "problem with $L() in GT.M"? > I > >am not aware of any bug with $L, so if you found a bug, please let > me > >know so that we can fix it. Since Unicode support is not yet > >implemented by GT.M, for any 8-bit character set, the length in > bytes is > >the same as the length in characters - in other words, it's a > feature. > >Thanx in advance for the clarification. > > > >-- Bhaskar > > --------------------------------------- > Jim Self > Systems Architect, Lead Developer > VMTH Computer Services, UC Davis > (http://www.vmth.ucdavis.edu/us/jaself) > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Hardhats-members mailing list > Hardhats-members@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/hardhats-members > A practical man is a man who practices the errors of his forefathers. --Benjamin Disraeli ==== Greg Woodhouse [EMAIL PROTECTED] [EMAIL PROTECTED] ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Hardhats-members mailing list Hardhats-members@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hardhats-members