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: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Vladimir Panteleev <[email protected]> 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/[email protected]
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------