From: terencehill Date: Sun, 3 Jan 2021 11:32:13 +0000 (+0100) Subject: Fix 3 non-UTF8 markup characters, fix and update UTF8 whitespace X-Git-Tag: xonotic-v0.8.5~611 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6df83c7659f87f92f5c65ebf495fcefb7ce61857;p=xonotic%2Fxonotic-data.pk3dir.git Fix 3 non-UTF8 markup characters, fix and update UTF8 whitespace --- diff --git a/qcsrc/common/command/markup.qc b/qcsrc/common/command/markup.qc index bd1b79cbf..2397982da 100644 --- a/qcsrc/common/command/markup.qc +++ b/qcsrc/common/command/markup.qc @@ -12,48 +12,50 @@ void GenericCommand_markup_init() if (markup_init) return; markup_init = true; + // "&<-" doesn't have a corresponding symbol anymore + // replaced with similar triangle facing left ("&<|") int i = 0; - markup_from[i] = "&alien"; markup_to[i] = "\x12"; ++i; - markup_from[i] = "&:-)"; markup_to[i] = "\x13"; ++i; - markup_from[i] = "&:-("; markup_to[i] = "\x14"; ++i; - markup_from[i] = "&x-P"; markup_to[i] = "\x15"; ++i; - markup_from[i] = "&:-/"; markup_to[i] = "\x16"; ++i; - markup_from[i] = "&:-D"; markup_to[i] = "\x17"; ++i; - markup_from[i] = "&<<"; markup_to[i] = "\x18"; ++i; - markup_from[i] = "&>>"; markup_to[i] = "\x19"; ++i; - markup_from[i] = "&dot"; markup_to[i] = "\x1a"; ++i; - markup_from[i] = "&^_"; markup_to[i] = "\x1b"; ++i; + markup_from[i] = "&alien"; markup_to[i] = "\x12"; ++i; + markup_from[i] = "&:-)"; markup_to[i] = "\x13"; ++i; + markup_from[i] = "&:-("; markup_to[i] = "\x14"; ++i; + markup_from[i] = "&x-P"; markup_to[i] = "\x15"; ++i; + markup_from[i] = "&:-/"; markup_to[i] = "\x16"; ++i; + markup_from[i] = "&:-D"; markup_to[i] = "\x17"; ++i; + markup_from[i] = "&<<"; markup_to[i] = "\x18"; ++i; + markup_from[i] = "&>>"; markup_to[i] = "\x19"; ++i; + markup_from[i] = "&dot"; markup_to[i] = "\x1a"; ++i; + markup_from[i] = "&^_"; markup_to[i] = "\x1b"; ++i; markup_from[i] = "&ysplat"; markup_to[i] = "\x1c"; ++i; - markup_from[i] = "&-]"; markup_to[i] = "\x1d"; ++i; - markup_from[i] = "&--"; markup_to[i] = "\x1e"; ++i; - markup_from[i] = "&[-"; markup_to[i] = "\x1f"; ++i; - markup_from[i] = "&s<"; markup_to[i] = "\x2c"; ++i; - markup_from[i] = "&s>"; markup_to[i] = "\x2e"; ++i; - markup_from[i] = "&<-"; markup_to[i] = "\x7f"; ++i; - markup_from[i] = "&[="; markup_to[i] = "\x80"; ++i; - markup_from[i] = "&=="; markup_to[i] = "\x81"; ++i; - markup_from[i] = "&=]"; markup_to[i] = "\x82"; ++i; - markup_from[i] = "&r!"; markup_to[i] = "\x84"; ++i; - markup_from[i] = "&|o|"; markup_to[i] = "\x85"; ++i; - markup_from[i] = "&|u|"; markup_to[i] = "\x86"; ++i; - markup_from[i] = "&|i|"; markup_to[i] = "\x87"; ++i; - markup_from[i] = "&|c|"; markup_to[i] = "\x88"; ++i; - markup_from[i] = "&[c]"; markup_to[i] = "\x89"; ++i; - markup_from[i] = "&[n]"; markup_to[i] = "\x8a"; ++i; - markup_from[i] = "&[]"; markup_to[i] = "\x8b"; ++i; - markup_from[i] = "&r?"; markup_to[i] = "\x8c"; ++i; - markup_from[i] = "&|>"; markup_to[i] = "\x8d"; ++i; + markup_from[i] = "&-]"; markup_to[i] = "\x1d"; ++i; + markup_from[i] = "&--"; markup_to[i] = "\x1e"; ++i; + markup_from[i] = "&[-"; markup_to[i] = "\x1f"; ++i; + markup_from[i] = "&s<"; markup_to[i] = "\xac"; ++i; + markup_from[i] = "&s>"; markup_to[i] = "\xae"; ++i; + markup_from[i] = "&<-"; markup_to[i] = "\xff"; ++i; // same as "&<|" + markup_from[i] = "&[="; markup_to[i] = "\x80"; ++i; + markup_from[i] = "&=="; markup_to[i] = "\x81"; ++i; + markup_from[i] = "&=]"; markup_to[i] = "\x82"; ++i; + markup_from[i] = "&r!"; markup_to[i] = "\x84"; ++i; + markup_from[i] = "&|o|"; markup_to[i] = "\x85"; ++i; + markup_from[i] = "&|u|"; markup_to[i] = "\x86"; ++i; + markup_from[i] = "&|i|"; markup_to[i] = "\x87"; ++i; + markup_from[i] = "&|c|"; markup_to[i] = "\x88"; ++i; + markup_from[i] = "&[c]"; markup_to[i] = "\x89"; ++i; + markup_from[i] = "&[n]"; markup_to[i] = "\x8a"; ++i; + markup_from[i] = "&[]"; markup_to[i] = "\x8b"; ++i; + markup_from[i] = "&r?"; markup_to[i] = "\x8c"; ++i; + markup_from[i] = "&|>"; markup_to[i] = "\x8d"; ++i; markup_from[i] = "&splat0"; markup_to[i] = "\x8e"; ++i; markup_from[i] = "&splat1"; markup_to[i] = "\x8f"; ++i; - markup_from[i] = "&[["; markup_to[i] = "\x90"; ++i; - markup_from[i] = "&]]"; markup_to[i] = "\x91"; ++i; + markup_from[i] = "&[["; markup_to[i] = "\x90"; ++i; + markup_from[i] = "&]]"; markup_to[i] = "\x91"; ++i; markup_from[i] = "&splat2"; markup_to[i] = "\x9a"; ++i; - markup_from[i] = "&)("; markup_to[i] = "\x9b"; ++i; + markup_from[i] = "&)("; markup_to[i] = "\x9b"; ++i; markup_from[i] = "&splat3"; markup_to[i] = "\x9c"; ++i; - markup_from[i] = "&(."; markup_to[i] = "\x9d"; ++i; - markup_from[i] = "&.."; markup_to[i] = "\x9e"; ++i; - markup_from[i] = "&.)"; markup_to[i] = "\x9f"; ++i; - markup_from[i] = "&<|"; markup_to[i] = "\xff"; ++i; + markup_from[i] = "&(."; markup_to[i] = "\x9d"; ++i; + markup_from[i] = "&.."; markup_to[i] = "\x9e"; ++i; + markup_from[i] = "&.)"; markup_to[i] = "\x9f"; ++i; + markup_from[i] = "&<|"; markup_to[i] = "\xff"; ++i; } string GenericCommand_markup(string s2) diff --git a/qcsrc/lib/string.qh b/qcsrc/lib/string.qh index a7508b8fb..946438ca5 100644 --- a/qcsrc/lib/string.qh +++ b/qcsrc/lib/string.qh @@ -312,7 +312,10 @@ bool isInvisibleString(string s) case 192: // charmap space if (!utf8) break; return false; - case 0xE000 + 192: // utf8 charmap space + case 0xE000: // invisible char of the utf8 quake charmap + case 0xE00A: // invisible char of the utf8 quake charmap + case 0xE0A0: // invisible char of the utf8 quake charmap + case 0xE020: // invisible char of the utf8 quake charmap case 0x00A0: // NO-BREAK SPACE //case 0x1680: // OGHAM SPACE MARK case 0x180E: // MONGOLIAN VOWEL SEPARATOR