diff options
author | jmarshallnz <jcmarsha@gmail.com> | 2014-07-18 08:21:25 +1200 |
---|---|---|
committer | Jonathan Marshall <jmarshall@xbmc.org> | 2014-07-19 17:20:34 +1200 |
commit | 0ee2d331aca5a864295e6645afb0ded4880ca554 (patch) | |
tree | b37e7e32faf23e4e27979cb3d8e2778ddfafe782 | |
parent | 7550dd9a8c6900b1ee26e6370cff3adae2b7357a (diff) |
Merge pull request #4896 from sportica/mac_fix_space
Some character disappear on mac os x
-rw-r--r-- | xbmc/utils/StringUtils.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xbmc/utils/StringUtils.cpp b/xbmc/utils/StringUtils.cpp index 35ee0cc4ec..ac1beeaf0e 100644 --- a/xbmc/utils/StringUtils.cpp +++ b/xbmc/utils/StringUtils.cpp @@ -443,11 +443,11 @@ std::string& StringUtils::Trim(std::string &str, const char* const chars) return TrimRight(str, chars); } -// hack to ensure that std::string::iterator will be dereferenced as _unsigned_ char -// without this hack "TrimX" functions failed on Win32 with UTF-8 strings +// hack to check only first byte of UTF-8 character +// without this hack "TrimX" functions failed on Win32 and OS X with UTF-8 strings static int isspace_c(char c) { - return ::isspace((unsigned char)c); + return (c & 0x80) == 0 && ::isspace(c); } std::string& StringUtils::TrimLeft(std::string &str) |