summaryrefslogtreecommitdiff
path: root/src/string_type.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/string_type.h')
-rw-r--r--src/string_type.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/string_type.h b/src/string_type.h
index 7fb8e0137..9532c86ad 100644
--- a/src/string_type.h
+++ b/src/string_type.h
@@ -15,6 +15,9 @@
/** A non-breaking space. */
#define NBSP "\xC2\xA0"
+/** A left-to-right marker, marks the next character as left-to-right. */
+#define LRM "\xE2\x80\x8E"
+
/**
* Valid filter types for IsValidChar.
*/
@@ -28,4 +31,14 @@ enum CharSetFilter {
typedef uint32 WChar;
+/* The following are directional formatting codes used to get the LTR and RTL strings right:
+ * http://www.unicode.org/unicode/reports/tr9/#Directional_Formatting_Codes */
+static const WChar CHAR_TD_LRM = 0x200E; ///< The next character acts like a left-to-right character.
+static const WChar CHAR_TD_RLM = 0x200F; ///< The next character acts like a right-to-left character.
+static const WChar CHAR_TD_LRE = 0x202A; ///< The following text is embedded left-to-right.
+static const WChar CHAR_TD_RLE = 0x202B; ///< The following text is embedded right-to-left.
+static const WChar CHAR_TD_LRO = 0x202D; ///< Force the following characters to be treated as left-to-right characters.
+static const WChar CHAR_TD_RLO = 0x202E; ///< Force the following characters to be treated as right-to-left characters.
+static const WChar CHAR_TD_PDF = 0x202C; ///< Restore the text-direction state to before the last LRE, RLE, LRO or RLO.
+
#endif /* STRING_TYPE_H */