(svn r21006) -Fix (r21004): don't print the text direction character when ICU isn't linked and thus doesn't remove them

This commit is contained in:
rubidium
2010-10-22 12:15:58 +00:00
parent 2d64b482ba
commit b933819b0b
2 changed files with 28 additions and 6 deletions

View File

@@ -224,6 +224,28 @@ static inline char *Utf8PrevChar(char *s)
return ret;
}
/**
* Is the given character a text direction character.
* @param c The character to test.
* @return true iff the character is used to influence
* the text direction.
*/
static inline bool IsTextDirectionChar(WChar c)
{
switch (c) {
case CHAR_TD_LRM:
case CHAR_TD_RLM:
case CHAR_TD_LRE:
case CHAR_TD_RLE:
case CHAR_TD_LRO:
case CHAR_TD_RLO:
case CHAR_TD_PDF:
return true;
default:
return false;
}
}
static inline bool IsPrintable(WChar c)
{