diff options
author | Tomasz Kamiński <tkaminsk@redhat.com> | 2025-04-03 10:23:45 +0200 |
---|---|---|
committer | Tomasz Kamiński <tkaminsk@redhat.com> | 2025-04-03 13:46:20 +0200 |
commit | 5c7f6272f43f4265dc08eac4ee91164672c1c441 (patch) | |
tree | a74b38b01cd8c0f5d674706477367f327036bd3a /libjava/classpath/lib | |
parent | 70bf0ee44017e8e26bb1bdcb6a3fd114c25c39c7 (diff) | |
download | gcc-5c7f6272f43f4265dc08eac4ee91164672c1c441.zip gcc-5c7f6272f43f4265dc08eac4ee91164672c1c441.tar.gz gcc-5c7f6272f43f4265dc08eac4ee91164672c1c441.tar.bz2 |
libstdc++: Fix handling of field width for wide strings and characters [PR119593]
This patch corrects handling of UTF-32LE and UTF32-BE in
__unicode::__literal_encoding_is_unicode<_CharT>, so they are
recognized as unicode and functions produces correct result for wchar_t.
Use `__unicode::__field_width` to compute the estimated witdh
of the charcter for unicode wide encoding.
PR libstdc++/119593
libstdc++-v3/ChangeLog:
* include/bits/unicode.h
(__unicode::__literal_encoding_is_unicode<_CharT>):
Corrected handing for UTF-16 and UTF-32 with "LE" or "BE" suffix.
* include/std/format (__formatter_str::_S_character_width):
Define.
(__formatter_str::_S_character_width): Updated passed char
length.
* testsuite/std/format/functions/format.cc: Test for wchar_t.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
Diffstat (limited to 'libjava/classpath/lib')
0 files changed, 0 insertions, 0 deletions