[Issue 21815] New: std.format: invalid UTF-character throws with width but not without
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Apr 9 15:35:28 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21815
Issue ID: 21815
Summary: std.format: invalid UTF-character throws with width
but not without
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: bugzilla at bernis-buecher.de
char[1] c;
writefln!"%s"(c[]);
writefln!"%5s"(c[]);
The first writefln prints 0xff-character, while the second one throws an
UFTException: "Attempted to decode past the end of a string (at index 1)".
IMHO, the second one should not throw, but just write some (four?) spaces and a
0xff-character.
--
More information about the Digitalmars-d-bugs
mailing list