Perl6 Unicode support

Andrew Godfrey via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun Jun 12 07:56:39 PDT 2016


On Sunday, 12 June 2016 at 08:15:37 UTC, ag0aep6g wrote:
> On 06/12/2016 05:16 AM, Andrew Godfrey wrote:
>> Eg it says ".chars returns the number of characters (aka 
>> graphemes)"
>>
>> Does this count the number of graphemes, or the number of 
>> grapheme
>> clusters? Later on with \r\n it pretty much says that it 
>> counts grapheme
>> clusters. Here it says it counts graphemes.
>
> Sorry, I still don't get it. Can you give an example string 
> where counting graphemes gives a different result from counting 
> grapheme clusters?

Huh. On researching "grapheme cluster", I see it is a weird 
Unicode term that apparently means the same thing as grapheme. 
Definitely something to avoid in an article (or, explain very 
carefully).
To the uninitiated, "grapheme cluster" means "a cluster of 
graphemes" and implies a one-to-many mapping.


More information about the Digitalmars-d-announce mailing list