-
Couldn't load subscription status.
- Fork 5.2k
Closed
Labels
area-System.RuntimequestionAnswer questions and provide assistance, not an issue with source code or documentation.Answer questions and provide assistance, not an issue with source code or documentation.
Milestone
Description
ported from https://github.com/dotnet/corefx/issues/24093#issuecomment-375585062
A document of TextElementEnumerator says that the .NET Framework defines a text element as a grapheme. However, what exactly does this "grapheme" means? Should the grapheme be the same as defined in "Grapheme Cluster Boundaries" in UAX dotnet/corefx#29?
using System;
using System.Globalization;
class Program
{
static void Main()
{
var e = StringInfo.GetTextElementEnumerator("👩🏻👦🏼👨🏽👦🏾👦🏿👩🏼👨🏽👦🏼👧🏽👩🏻👩🏿👧🏼👧🏾");
while (e.MoveNext())
{
Console.WriteLine(e.GetTextElement());
}
}
}expected result:
👩🏻👦🏼
👨🏽👦🏾👦🏿
👩🏼👨🏽👦🏼👧🏽
👩🏻👩🏿👧🏼👧🏾
actual result:
👩
🏻
👦
🏼
👨
🏽
👦
🏾
👦
🏿
👩
🏼
👨
🏽
👦
🏼
👧
🏽
👩
🏻
👩
🏿
👧
🏼
👧
🏾
Metadata
Metadata
Assignees
Labels
area-System.RuntimequestionAnswer questions and provide assistance, not an issue with source code or documentation.Answer questions and provide assistance, not an issue with source code or documentation.