Fix of NormalizeAndLower
This commit is contained in:
parent
f9dcfb55f4
commit
9ec0e4b935
1 changed files with 3 additions and 0 deletions
3
env/strings.cpp
vendored
3
env/strings.cpp
vendored
|
@ -12,6 +12,9 @@ namespace str
|
|||
string MakeNormalizeAndLowerUtf8(string const & s)
|
||||
{
|
||||
int const count = static_cast<int>(s.size());
|
||||
if (count == 0)
|
||||
return string();
|
||||
|
||||
vector<int32_t> buffer(count);
|
||||
int sz = utf8proc_decompose(reinterpret_cast<uint8_t const *>(s.c_str()), count, buffer.data(), count,
|
||||
UTF8PROC_CASEFOLD | UTF8PROC_DECOMPOSE | UTF8PROC_STRIPMARK);
|
||||
|
|
Reference in a new issue