在 2025-9-16 00:10, David Malcolm 写道:
I notice that libcpp/charset.cc defines a function convert_utf8_utf16 (albeit currently static). Is there a way that this could be reused, rather than adding a 2nd implementation?
On Windows there's `MultiByteToWideChar()` which can do UTF-8-to-UTF-16 conversion, however we would have to add some boilerplate code, for example, it takes string lengths as `int` which might not be enough for 64-bit hosts; ignoring the possibility of truncation is probably not good.
Also there's a third patch so please comment on that instead. -- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature