UTF-8 issues

Walter Bright newshound1 at digitalmars.com
Mon Sep 15 11:37:53 PDT 2008


Eldar Insafutdinov wrote:
> I faced some issues with utf-8 support in D. As it stated in
> http://www.digitalmars.com/d/2.0/cppstrings.html strings support
> slicing and length-calculation. Since strings are char arrays this is
> correct only for latin strings. So when the strings for example
> cyrillic chars - length is wrong, indexing also doesn't work, and
> slicing too. But foreach works correctly. So utf-8 support is
> partial. Maybe there are functions from standart library that does
> this work? I checked D2 new features - there was not improving utf-8
> support - am I wrong?


This should help:

http://www.digitalmars.com/d/2.0/phobos/std_utf.html



More information about the Digitalmars-d mailing list