fmt version: 8.1.1 and top-of-tree
There seems to be an issue with aligned fields where an extra leading space is added when the value has a trailing zero. To replicate, I added the following tests to an xchar-test.cc unit test:
EXPECT_EQ(L" 1,235", fmt::format(std::locale("en_US.UTF-8"), L"{:8L}", rint(1234.56)));
EXPECT_EQ(L" 1,230", fmt::format(std::locale("en_US.UTF-8"), L"{:8L}", rint(1230.0)));
The first test passes, but the second one shows the issue. A value of:
is returned by fmt::format() instead of
I'm not sure if the locale really affects it, I haven't played with the parameters that much. Let me know if you need more information.
fmt version: 8.1.1 and top-of-tree
There seems to be an issue with aligned fields where an extra leading space is added when the value has a trailing zero. To replicate, I added the following tests to an xchar-test.cc unit test:
The first test passes, but the second one shows the issue. A value of:
is returned by
fmt::format()instead ofI'm not sure if the locale really affects it, I haven't played with the parameters that much. Let me know if you need more information.