diff options
author | André Nusser <andre.nusser@googlemail.com> | 2017-04-21 12:39:19 +0200 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2017-04-21 12:39:19 +0200 |
commit | 2ec292d057bdcf165aead595f2bfcbb419dc10f7 (patch) | |
tree | 6f0d92b6502c4c2d386349e222c079f64f17ae68 | |
parent | 96a8947f039b85b919e96645d10009e85a0ce0a5 (diff) |
Attempt a fix for the FreeBSD encoding error.
-rw-r--r-- | plugingui/utf8.cc | 258 |
1 files changed, 129 insertions, 129 deletions
diff --git a/plugingui/utf8.cc b/plugingui/utf8.cc index a5fee63..a14fd43 100644 --- a/plugingui/utf8.cc +++ b/plugingui/utf8.cc @@ -29,38 +29,38 @@ UTF8::UTF8() { // Encode Map - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = "
"; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; - map_encode[""] = ""; + map_encode["\x80"] = "\x80"; + map_encode["\x81"] = "\x81"; + map_encode["\x82"] = "\x82"; + map_encode["\x83"] = "\x83"; + map_encode["\x84"] = "\x84"; + map_encode["\x85"] = "\x85"; + map_encode["\x86"] = "\x86"; + map_encode["\x87"] = "\x87"; + map_encode["\x88"] = "\x88"; + map_encode["\x89"] = "\x89"; + map_encode["\x8a"] = "\x8a"; + map_encode["\x8b"] = "\x8b"; + map_encode["\x8c"] = "\x8c"; + map_encode["\x8d"] = "\x8d"; + map_encode["\x8e"] = "\x8e"; + map_encode["\x8f"] = "\x8f"; + map_encode["\x90"] = "\x90"; + map_encode["\x91"] = "\x91"; + map_encode["\x92"] = "\x92"; + map_encode["\x93"] = "\x93"; + map_encode["\x94"] = "\x94"; + map_encode["\x95"] = "\x95"; + map_encode["\x96"] = "\x96"; + map_encode["\x97"] = "\x97"; + map_encode["\x98"] = "\x98"; + map_encode["\x99"] = "\x99"; + map_encode["\x9a"] = "\x9a"; + map_encode["\x9b"] = "\x9b"; + map_encode["\x9c"] = "\x9c"; + map_encode["\x9d"] = "\x9d"; + map_encode["\x9e"] = "\x9e"; + map_encode["\x9f"] = "\x9f"; map_encode[""] = " "; map_encode[""] = "¡"; map_encode[""] = "¢"; @@ -93,38 +93,38 @@ UTF8::UTF8() map_encode[""] = "½"; map_encode[""] = "¾"; map_encode[""] = "¿"; - map_encode[""] = "À"; - map_encode[""] = "Á"; - map_encode[""] = "Â"; - map_encode[""] = "Ã"; - map_encode[""] = "Ä"; - map_encode[""] = "Å"; - map_encode[""] = "Æ"; - map_encode[""] = "Ç"; - map_encode[""] = "È"; - map_encode[""] = "É"; - map_encode[""] = "Ê"; - map_encode[""] = "Ë"; - map_encode[""] = "Ì"; - map_encode[""] = "Í"; - map_encode[""] = "Î"; - map_encode[""] = "Ï"; - map_encode[""] = "Ð"; - map_encode[""] = "Ñ"; - map_encode[""] = "Ò"; - map_encode[""] = "Ó"; - map_encode[""] = "Ô"; - map_encode[""] = "Õ"; - map_encode[""] = "Ö"; - map_encode[""] = "×"; - map_encode[""] = "Ø"; - map_encode[""] = "Ù"; - map_encode[""] = "Ú"; - map_encode[""] = "Û"; - map_encode[""] = "Ü"; - map_encode[""] = "Ý"; - map_encode[""] = "Þ"; - map_encode[""] = "ß"; + map_encode[""] = "\x80"; + map_encode[""] = "\x81"; + map_encode[""] = "\x82"; + map_encode[""] = "\x83"; + map_encode[""] = "\x84"; + map_encode[""] = "\x85"; + map_encode[""] = "\x86"; + map_encode[""] = "\x87"; + map_encode[""] = "\x88"; + map_encode[""] = "\x89"; + map_encode[""] = "\x8a"; + map_encode[""] = "\x8b"; + map_encode[""] = "\x8c"; + map_encode[""] = "\x8d"; + map_encode[""] = "\x8e"; + map_encode[""] = "\x8f"; + map_encode[""] = "\x90"; + map_encode[""] = "\x91"; + map_encode[""] = "\x92"; + map_encode[""] = "\x93"; + map_encode[""] = "\x94"; + map_encode[""] = "\x95"; + map_encode[""] = "\x96"; + map_encode[""] = "\x97"; + map_encode[""] = "\x98"; + map_encode[""] = "\x99"; + map_encode[""] = "\x9a"; + map_encode[""] = "\x9b"; + map_encode[""] = "\x9c"; + map_encode[""] = "\x9d"; + map_encode[""] = "\x9e"; + map_encode[""] = "\x9f"; map_encode[""] = "à"; map_encode[""] = "á"; map_encode[""] = "â"; @@ -159,38 +159,38 @@ UTF8::UTF8() map_encode[""] = "ÿ"; // Decode Map - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode["
"] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; - map_decode[""] = ""; + map_decode["\x80"] = "\x80"; + map_decode["\x81"] = "\x81"; + map_decode["\x82"] = "\x82"; + map_decode["\x83"] = "\x83"; + map_decode["\x84"] = "\x84"; + map_decode["\x85"] = "\x85"; + map_decode["\x86"] = "\x86"; + map_decode["\x87"] = "\x87"; + map_decode["\x88"] = "\x88"; + map_decode["\x89"] = "\x89"; + map_decode["\x8a"] = "\x8a"; + map_decode["\x8b"] = "\x8b"; + map_decode["\x8c"] = "\x8c"; + map_decode["\x8d"] = "\x8d"; + map_decode["\x8e"] = "\x8e"; + map_decode["\x8f"] = "\x8f"; + map_decode["\x90"] = "\x90"; + map_decode["\x91"] = "\x91"; + map_decode["\x92"] = "\x92"; + map_decode["\x93"] = "\x93"; + map_decode["\x94"] = "\x94"; + map_decode["\x95"] = "\x95"; + map_decode["\x96"] = "\x96"; + map_decode["\x97"] = "\x97"; + map_decode["\x98"] = "\x98"; + map_decode["\x99"] = "\x99"; + map_decode["\x9a"] = "\x9a"; + map_decode["\x9b"] = "\x9b"; + map_decode["\x9c"] = "\x9c"; + map_decode["\x9d"] = "\x9d"; + map_decode["\x9e"] = "\x9e"; + map_decode["\x9f"] = "\x9f"; map_decode[" "] = ""; map_decode["¡"] = ""; map_decode["¢"] = ""; @@ -223,38 +223,38 @@ UTF8::UTF8() map_decode["½"] = ""; map_decode["¾"] = ""; map_decode["¿"] = ""; - map_decode["À"] = ""; - map_decode["Á"] = ""; - map_decode["Â"] = ""; - map_decode["Ã"] = ""; - map_decode["Ä"] = ""; - map_decode["Å"] = ""; - map_decode["Æ"] = ""; - map_decode["Ç"] = ""; - map_decode["È"] = ""; - map_decode["É"] = ""; - map_decode["Ê"] = ""; - map_decode["Ë"] = ""; - map_decode["Ì"] = ""; - map_decode["Í"] = ""; - map_decode["Î"] = ""; - map_decode["Ï"] = ""; - map_decode["Ð"] = ""; - map_decode["Ñ"] = ""; - map_decode["Ò"] = ""; - map_decode["Ó"] = ""; - map_decode["Ô"] = ""; - map_decode["Õ"] = ""; - map_decode["Ö"] = ""; - map_decode["×"] = ""; - map_decode["Ø"] = ""; - map_decode["Ù"] = ""; - map_decode["Ú"] = ""; - map_decode["Û"] = ""; - map_decode["Ü"] = ""; - map_decode["Ý"] = ""; - map_decode["Þ"] = ""; - map_decode["ß"] = ""; + map_decode["\x80"] = ""; + map_decode["\x81"] = ""; + map_decode["\x82"] = ""; + map_decode["\x83"] = ""; + map_decode["\x84"] = ""; + map_decode["\x85"] = ""; + map_decode["\x86"] = ""; + map_decode["\x87"] = ""; + map_decode["\x88"] = ""; + map_decode["\x89"] = ""; + map_decode["\x8a"] = ""; + map_decode["\x8b"] = ""; + map_decode["\x8c"] = ""; + map_decode["\x8d"] = ""; + map_decode["\x8e"] = ""; + map_decode["\x8f"] = ""; + map_decode["\x90"] = ""; + map_decode["\x91"] = ""; + map_decode["\x92"] = ""; + map_decode["\x93"] = ""; + map_decode["\x94"] = ""; + map_decode["\x95"] = ""; + map_decode["\x96"] = ""; + map_decode["\x97"] = ""; + map_decode["\x98"] = ""; + map_decode["\x99"] = ""; + map_decode["\x9a"] = ""; + map_decode["\x9b"] = ""; + map_decode["\x9c"] = ""; + map_decode["\x9d"] = ""; + map_decode["\x9e"] = ""; + map_decode["\x9f"] = ""; map_decode["à"] = ""; map_decode["á"] = ""; map_decode["â"] = ""; @@ -288,7 +288,7 @@ UTF8::UTF8() map_decode["þ"] = ""; map_decode["ÿ"] = ""; // FIXME: This is just a hack to make Goran Mekic's name work. - map_decode["ć"] = "c"; + map_decode["\x87"] = "c"; } std::string UTF8::fromLatin1(std::string const& s) |