← Back to index
|
Original Bugzilla link
Bug 12324 – std.uni.Grapheme / byGrapheme can't search for decomposed form
Status
NEW
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-03-08T14:58:49Z
Last change time
2024-12-01T16:20:27Z
Assigned to
Dmitry Olshansky
Creator
Vladimir Panteleev
Moved to GitHub: phobos#10037 →
Comments
Comment #0
by dlang-bugzilla — 2014-03-08T14:58:49Z
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]
Comment #1
by dmitry.olsh — 2017-09-20T08:11:28Z
Normalization is the answer here. Should I do it on grapheme construction? I don't think so.
Comment #2
by robert.schadek — 2024-12-01T16:20:27Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/phobos/issues/10037
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB