Bug 21557 – std.encoding and std.utf do not use replacement char consistently

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2021-01-18T14:16:41Z
Last change time
2024-12-01T16:38:14Z
Assigned to
No Owner
Creator
deadalnix
Moved to GitHub: phobos#10452 →

Comments

Comment #0 by deadalnix — 2021-01-18T14:16:41Z
std.utf uses std.utf.replacementDchar, which seems is what unicode actually expects to happen. However, std.encoding uses std.encoding.INVALID_SEQUENCE , defined here: https://github.com/dlang/phobos/blob/master/std/encoding.d#L481 This later value isn't the one expected by the unicode standard. Additionally, the later value creates a problem because now there are two values to handle for replacement chars.
Comment #1 by robert.schadek — 2024-12-01T16:38:14Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10452 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB