[libcxx-commits] [PATCH] D143349: [libc++] Fix UTF-8 decoding in codecvts. Fix #60177.

Dimitrij Mijoski via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Feb 5 14:09:15 PST 2023


dimztimz created this revision.
dimztimz added reviewers: ldionne, libc++.
dimztimz added a project: libc++.
Herald added a project: All.
dimztimz requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.

This patch fixes one case where the decoding member function `in()` was returning `partial` instead of `error`. Additionally, it adds large testsuite that tests conversions between UTF-8 and other encodings. The testsuite covers this bug.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143349

Files:
  libcxx/src/locale.cpp
  libcxx/test/std/localization/codecvt_unicode.h
  libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp
  libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp
  libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp
  libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp
  libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp
  libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp
  libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp
  libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143349.494946.patch
Type: text/x-patch
Size: 57009 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230205/5d58a7b8/attachment-0001.bin>


More information about the libcxx-commits mailing list