This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of SG16 status.

### 3639. Handling of fill character width is underspecified in `std::format`

Section: 20.20.2.2 [format.string.std] Status: SG16 Submitter: Victor Zverovich Opened: 2021-11-13 Last modified: 2021-11-14

Priority: 3

View other active issues in [format.string.std].

View all other issues in [format.string.std].

View all issues with SG16 status.

Discussion:

20.20.2.2 [format.string.std] doesn't specify if implementations should consider the estimated width of the fill character when substituting it into the formatted results.

For example:

>     auto s = std::format("{:🤡>10}", 42);

`"🤡"` (U+1F921) is a single code point but its estimated display width is two.

There are at least three possible resolutions:

1. `s == "🤡🤡🤡🤡42"`: use the estimated display width, correctly displayed on compatible terminals.

2. `s == "🤡🤡🤡🤡🤡🤡🤡🤡42"`: assume the display width of 1, incorrectly displayed.

3. Require the fill character to have the estimated width of 1.

[2021-11-14; Daniel comments]

Resolving this issue should be harmonized with resolving LWG 3576.

[2022-01-30; Reflector poll]

Set priority to 3 after reflector poll. Sent to SG16.

Proposed resolution: