https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119593

            Bug ID: 119593
           Summary: Format width is not correctly handled for unicode
                    characters
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tkaminsk at gcc dot gnu.org
  Target Milestone: ---

The following line, produce string with two '+' of padding. 
  std::format(L"{:+<3}", L'\U0001f921');
// https://godbolt.org/z/b9Mr73Pe5

However as the '\U0001f921' has estimated width 2, only one `+` should be
produced.
This only happens for wchar_t, as single char can represent code points in
ASCII range (<= 0x7f) that all have estimated width of 1.

Reply via email to