Show questions instead of crushing in case of UTF-8 errors

fix-squashed-planets
Evgeny Pestov 2021-12-16 21:36:37 +07:00
parent 9269a55e8b
commit cd059bd511
1 changed files with 0 additions and 4 deletions

View File

@ -182,10 +182,6 @@ int StrUtils::Utf8CharSizeAt(const std::string &str, unsigned int pos)
if((c & 0xE0) == 0xC0)
return 2;
// Invalid char - unexpected continuation byte
if((c & 0xC0) == 0x80)
throw std::invalid_argument("Unexpected UTF-8 continuation byte");
return 1;
}