[PATCH] D107202: ConvertUTF: convertUTF32ToUTF8String

Marcus Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 2 15:59:10 PDT 2021


MarcusJohnson91 added a comment.

In D107202#2920915 <https://reviews.llvm.org/D107202#2920915>, @efriedma wrote:

> In D106753#2917762 <https://reviews.llvm.org/D106753#2917762>, @efriedma wrote:
>
>> As far as I can tell, the lastest version of the diff you uploaded still has the following issues that haven't been addressed:
>>
>> 1. The BOM handling is actually actively a problem if you're planning to use the interface to interpret wprintf format strings. We don't want to byteswap `L"\uFFFE%s"` or something like that.
>> 2. `SrcBytes.size() * UNI_MAX_UTF8_BYTES_PER_CODE_POINT + 1` seems like way too much memory.

What BOM handling? there is no BOM function, bytes are swapped in the converter if the byte order isn't correct, is that what you mean?

I copied  `SrcBytes.size() * UNI_MAX_UTF8_BYTES_PER_CODE_POINT + 1` from the UTF-16 version.

Are you asking me to change the UTF-16 version too?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107202/new/

https://reviews.llvm.org/D107202



More information about the llvm-commits mailing list