[Issue 203] std.format.doFormat() pads width incorrectly on Unicode strings
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Apr 29 00:09:34 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=203
thomas-dloop at kuehne.cn changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|wrong-code |spec
OS/Version|Windows |All
------- Comment #1 from thomas-dloop at kuehne.cn 2007-04-29 02:09 -------
> One would expect the last two strings, having five characters each,
> to both be padded in the front by three spaces: however, it appears
> the byte count is being used for determining the length and not the
> actual character count, and so the last string is padded by only one
> space.
The only relevant documentation I found is:
> Width
> Specifies the minimum field width. If the width is a *, the next
> argument, which must be of type int, is taken as the width. If
> the width is negative, it is as if the - was given as a Flags
> character.
"field width" could be both interpreted as " byte length" and
"UTF codepoint count".
--
More information about the Digitalmars-d-bugs
mailing list