Bug 24841 – UTF-16 surrogates when used as an escape of a string should hint on error
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-11-02T06:42:50Z
Last change time
2024-11-16T23:27:17Z
Keywords
pull
Assigned to
No Owner
Creator
Richard (Rikki) Andrew Cattermole
Comments
Comment #0 by alphaglosined — 2024-11-02T06:42:50Z
UTF-16 has some special ranges assigned to it known as surrogates.
If they appear as a dchar it is rightly an error.
The lexer should when it sees this range, should error but hint that what you tried to escape was the wchar's as if they were dchar's.
Comment #1 by dlang-bot — 2024-11-02T06:56:31Z
@rikkimax created dlang/dmd pull request #17047 "Fix bugzilla issue 24841 - UTF-16 surrogates when used as an escape of a string should hint on error" fixing this issue:
- Fix bugzilla issue 24841 - UTF-16 surrogates when used as an escape of a string should hint on error
https://github.com/dlang/dmd/pull/17047
Comment #2 by dlang-bot — 2024-11-03T11:30:59Z
dlang/dmd pull request #17047 "Fix bugzilla issue 24841 - UTF-16 surrogates when used as an escape of a string should hint on error" was merged into stable:
- 6fb4da37daaf1767b78b1bc0791591dcf8c2dfb8 by Richard (Rikki) Andrew Cattermole:
Fix bugzilla issue 24841 - UTF-16 surrogates when used as an escape of a string should hint on error
https://github.com/dlang/dmd/pull/17047
Comment #3 by dlang-bot — 2024-11-16T23:27:17Z
dlang/dmd pull request #17069 "Merge stable" was merged into master:
- b11b3f3bfa8d8fd1dd9413bb97d044855aef7613 by Richard (Rikki) Andrew Cattermole:
Fix bugzilla issue 24841 - UTF-16 surrogates when used as an escape of a string should hint on error
https://github.com/dlang/dmd/pull/17069