[Issue 18205] Format string with width specification doesn't work with multibyte characters

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 7 18:24:28 UTC 2018


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

--- Comment #1 from dransic at gmail.com ---
The current behaviour seems to be by design, according to this unittest assert
from Phobos (std.format#L5779):

assert(format("%8s", "b\u00e9ll\u00f4") == " b\u00e9ll\u00f4");

The length of the tested string is 8 (code points), but it prints 6 glyphs. I
can't guess the rationale behind this, since the purpose is formatting.

--


More information about the Digitalmars-d-bugs mailing list