[Issue 18105] std.conv.parse!wchar cannot take a string

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 19 19:22:41 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=18105

--- Comment #2 from dechcaudron+dlang.issue.tracking at protonmail.com ---
(In reply to Steven Schveighoffer from comment #1)
> What if the string's first dchar is a surrogate pair? It doesn't fit into a
> wchar then.

That is correct, and it will pose a problem when using 'to' (I'm already seeing
it. It throws UTFException. But 'parse' will indeed get the first element of
the pair in such case.

--


More information about the Digitalmars-d-bugs mailing list