D's Auto Decoding and You
tsbockman via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Thu Jun 2 23:58:57 PDT 2016
On Friday, 3 June 2016 at 06:37:59 UTC, Rory McGuire wrote:
> This dpaste shows a couple of issues with combining chars in D.
>
> https://dpaste.dzfl.pl/4b006959c5c0
>
> The compiler actually can't handle a combining character
> literal either. see line 10.
Your paste behaves as expected: the "character" types in D are
defined as single Unicode code units. By definition, the NFD form
of "é" is not a single code unit. You would need to use a
Grapheme or [w|d]string for that.
(Of course, one might reasonably question how useful our built-in
character types actually are compared to ubyte/ushort/uint.)
More information about the Digitalmars-d-announce
mailing list