Bug 15888 – std.format should not produce deprecated hexstrings

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-04-06T19:21:04Z
Last change time
2021-03-31T08:25:21Z
Keywords
pull
Assigned to
No Owner
Creator
ag0aep6g

Comments

Comment #0 by ag0aep6g — 2016-04-06T19:21:04Z
---- void main() { import std.stdio: writeln; ushort[] a = [0xFF_FE, 0x42]; writeln([cast(wchar[]) a]); uint[] b = [0x0F_FF_FF_FF, 0x42]; writeln([cast(dchar[]) b]); } ---- Prints: ---- [x"FFFE 42"w] [x"FFFFFFF 42"d] ---- Should print something like this: ---- [x"FEFF 4200"w] [x"FFFFFF0F 42000000"d] ---- Or, since endianess matters: ---- [[wchar(0xFFFE), 0x42]] [[dchar(0xFFFFFFF), 0x42]] ---- Mind issue 15887, though.
Comment #1 by bugzilla — 2021-02-07T13:06:02Z
Hex strings are deprecated. IMHO this is a WONTFIX.
Comment #2 by ag0aep6g — 2021-02-07T13:19:24Z
(In reply to Berni44 from comment #1) > Hex strings are deprecated. IMHO this is a WONTFIX. That's just more reason for writeln not to print them. Reopening. Please read issues more carefully before closing them.
Comment #3 by bugzilla — 2021-02-07T14:32:56Z
(In reply to ag0aep6g from comment #2) > That's just more reason for writeln not to print them. Reopening. Please > read issues more carefully before closing them. Sorry. My focus was on the "should print" section, which is definitively not, what it should print anymore. So maybe this should be renamed to "writeln should not print hex strings?"
Comment #4 by dlang-bot — 2021-03-25T13:03:02Z
@berni44 created dlang/phobos pull request #7918 "Fix Issue 15888 - std.format should not produce deprecated hexstrings" fixing this issue: - Fix Issue 15888 - std.format should not produce deprecated hexstrings https://github.com/dlang/phobos/pull/7918
Comment #5 by dlang-bot — 2021-03-31T08:25:21Z
dlang/phobos pull request #7918 "Fix Issue 15888 - std.format should not produce deprecated hexstrings" was merged into master: - e786cff3535795a1576b9df6e5223721ab82342f by berni44: Fix Issue 15888 - std.format should not produce deprecated hexstrings https://github.com/dlang/phobos/pull/7918