Skip to content

Commit

Permalink
Merge pull request #4896 from sportica/mac_fix_space
Browse files Browse the repository at this point in the history
Some character disappear on mac os x
  • Loading branch information
jmarshallnz authored and Jonathan Marshall committed Jul 19, 2014
1 parent 7550dd9 commit 0ee2d33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xbmc/utils/StringUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0ee2d33

Please sign in to comment.