GraphemeSplitter icon indicating copy to clipboard operation
GraphemeSplitter copied to clipboard

Support UTF-8 bytes

Open ufcpp opened this issue 7 years ago • 0 comments

var utf8 = new byte[] { 240, 159, 145, 168, 226, 128, 141, 240, 159, 145, 168, 226, 128, 141, 240, 159, 145, 167, 226, 128, 141, 240, 159, 145, 166, 240, 159, 145, 169, 226, 128, 141, 240, 159, 145, 169, 226, 128, 141, 240, 159, 145, 167, 226, 128, 141, 240, 159, 145, 166, 240, 159, 145, 168, 226, 128, 141, 240, 159, 145, 168, 226, 128, 141, 240, 159, 145, 167, 226, 128, 141, 240, 159, 145, 166 };

// ×
Encoding.UTF8.GetString(utf8).GetGraphemes();

// 〇
utf8.GetGraphemes();

ufcpp avatar Oct 28 '17 13:10 ufcpp