why a part of D community do not want go to D2 ?
spir
denis.spir at gmail.com
Fri Nov 12 01:27:08 PST 2010
On Fri, 12 Nov 2010 01:00:18 +0100
Daniel Gibson <metalcaedes at gmail.com> wrote:
> > http://www.digitalmars.com/d/2.0/phobos/std_utf.html
>
> If I'm not mistaken, those functions don't handle these "graphemes", i.e.
> something that appears like one character on the screen, but consists of
> multiple code *points*. Like spir's "â" that, in UTF-8, is encoded with the
> following bytes: 0x61 (=='a'), 0xCC, 0x82. (Or \u0061\u0302 in UTF-32).
You are right, Daniel. As far as I understand it superficially (haven't used it yet), the current utf library deals with the lower-level issues of encoding code point into code units, and bytes.
> Also, a function returning the physical position (i.e. pos in arrray of chars or
> wchars) of logical char #logPos may be useful, e.g. for fixed width printing stuff:
> size_t getPhysPos(char[] str, size_t logPos)
See my reply to Walter's next post.
Denis
-- -- -- -- -- -- --
vit esse estrany ☣
spir.wikidot.com
More information about the Digitalmars-d
mailing list