Skip to content

Commit 47aae06

Browse files
committed
Making sure UCS1 python static strings are in UTF-8
1 parent 0afed11 commit 47aae06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/inc/sys_string/impl/platforms/python_any.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ namespace sysstr
483483
constexpr auto size = ::std::size(U##x); \
484484
constexpr auto maxChar = ::sysstr::util::find_max_codepoint(U##x); \
485485
if constexpr (maxChar <= 0x7fu) { \
486-
static ::sysstr::util::PyUnicodeObject_wrapper<PyUnicode_1BYTE_KIND> str(size - 1, x); \
486+
static ::sysstr::util::PyUnicodeObject_wrapper<PyUnicode_1BYTE_KIND> str(size - 1, u8##x); \
487487
return str.as_string(); \
488488
} else if constexpr (maxChar <= 0xffffu) { \
489489
static ::sysstr::util::PyUnicodeObject_wrapper<PyUnicode_2BYTE_KIND> str(size - 1, u##x); \

0 commit comments

Comments
 (0)