www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18205] New: Format string with width specification doesn't

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

          Issue ID: 18205
           Summary: Format string with width specification doesn't work
                    with multibyte characters
           Product: D
           Version: D2
          Hardware: All
               URL: http://dlang.org/
                OS: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: dransic gmail.com

---
import std.format;

void main()
{
    assert("|%8s|".format("abc") == "|     abc|");
    assert("|%8s|".format("αβγ") == "|     αβγ|"); // FAILS! -> |  αβγ|
}
---

--
Jan 07