Skip to content

Commit 8cd3d27

Browse files
tautschnigPetr Bauch
authored and
Petr Bauch
committed
Change utf16_native_endian_to_java to consume char16_t
Java chars are fixed to be 16 bits by the standard.
1 parent 87d1a07 commit 8cd3d27

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/util/unicode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ static void utf16_native_endian_to_java(
295295

296296
/// \param ch: UTF-16 character in architecture-native endianness encoding
297297
/// \return String in US-ASCII format, with \\uxxxx escapes for other characters
298-
std::string utf16_native_endian_to_java(const wchar_t ch)
298+
std::string utf16_native_endian_to_java(const char16_t ch)
299299
{
300300
std::ostringstream result;
301301
const std::locale loc;

src/util/unicode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ std::string
2626
utf32_native_endian_to_utf8(const std::basic_string<unsigned int> &s);
2727

2828
std::wstring utf8_to_utf16_native_endian(const std::string &in);
29-
std::string utf16_native_endian_to_java(const wchar_t ch);
29+
std::string utf16_native_endian_to_java(const char16_t ch);
3030
std::string utf16_native_endian_to_java(const std::wstring &in);
3131

3232
std::vector<std::string> narrow_argv(int argc, const wchar_t **argv_wide);

0 commit comments

Comments
 (0)