I have the following trimming function
std::string trim(const std::string &input)
{
icu::UnicodeString unicodeString = icu::UnicodeString::fromUTF8(input);
unicodeString.trim();
std::string result;
unicodeString.toUTF8String(result);
return result;
}
It works just fine for regular spaces, but if I add NBSP it doesn’t handle it properly. Am I supposed to handle that myself? I thought NBSP was part of the Unicode standard – meaning the ICU library should handle it.