diff --git a/core/src/util_normalize.cpp b/core/src/util_normalize.cpp index 947dbe0f85..bcdfc1bb3f 100644 --- a/core/src/util_normalize.cpp +++ b/core/src/util_normalize.cpp @@ -228,8 +228,10 @@ bool has_nfd_boundary_before(km_core_usv cp) { } /** - * Helper to convert icu::UnicodeString to a UTF-32 km_core_usv buffer, - * nul-terminated + * Helper to convert std::u32string to a UTF-32 km_core_usv buffer, + * nul-terminated. + * Parallel to unicode_string_to_usv() + * @returns new buffer, caller owns storage */ km_core_usv *string_to_usv(const std::u32string& src) { return km::core::kmx::u32dup(src.c_str()); diff --git a/core/src/util_normalize_table_generator.cpp b/core/src/util_normalize_table_generator.cpp index b5895a588b..994f16d8b3 100644 --- a/core/src/util_normalize_table_generator.cpp +++ b/core/src/util_normalize_table_generator.cpp @@ -55,7 +55,7 @@ write_nfd_table() { // collect the raw list of chars that do NOT have a boundary before them. std::vector noBoundary; - for (km_core_usv ch = 0; ch < 0x10FFFF; ch++) { + for (km_core_usv ch = 0; ch < km::core::kmx::Uni_MAX_CODEPOINT; ch++) { bool bb = nfd->hasBoundaryBefore(ch); assert(!(ch == 0 && !bb)); // assert that we can use U+0000 as a terminator if (bb) continue; //only emit nonboundary