[Issue 12324] New: std.uni.Grapheme / byGrapheme can't search for decomposed form
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 8 14:58:51 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12324
Summary: std.uni.Grapheme / byGrapheme can't search for
decomposed form
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: thecybershadow at gmail.com
--- Comment #0 from Vladimir Panteleev <thecybershadow at gmail.com> 2014-03-09 00:58:49 EET ---
import std.uni;
import std.algorithm;
void main()
{
auto s = "casse\u0301"; // "é" ("e" + combining diacritic)
assert(s.byGrapheme.canFind(Grapheme("\u00e9"))); // "é"
}
If you print Grapheme("\u00e9") and the last grapheme in s, many of the fields
appear to be different:
Grapheme(1000065, 3, 0, 33554432, [101, 0, 0, 1, 3, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0], 2) // last byGrapheme
vs.
Grapheme(E9, 0, 0, 16777216, [233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0], 1) // Grapheme("é")
http://forum.dlang.org/post/mwunfkwzcmmxtjmahlck@forum.dlang.org
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list