]> de.git.xonotic.org Git - xonotic/xonstat.git/commitdiff
Dave does have a point.
authorAnt Zucaro <azucaro@gmail.com>
Mon, 21 Nov 2011 20:02:02 +0000 (15:02 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Mon, 21 Nov 2011 20:02:02 +0000 (15:02 -0500)
xonstat/util.py
xonstat/views/submission.py

index 9caf856476b688cd88a84b8be05a08e8f4b664b8..15565db1692d48ccf74aa5fa323c8681efcff35b 100755 (executable)
@@ -68,6 +68,10 @@ def html_colors(str=''):
         str = ''
 
     orig = str
+
+    # "downsample" the given UTF-8 characters to ASCII
+    str = qfont_decode(str)
+
     str = re.sub(r'\^x(\w)(\w)(\w)', 
             "<span style='color:#\g<1>\g<1>\g<2>\g<2>\g<3>\g<3>'>", str)
     str = re.sub(r'\^1', "<span style='color:#FF9900'>", str)
index 36e094155953258fbf41ec33f95857c7b35a3e78..1c4f2fac3d95a85183bec3fbf25b6a898eeb684d 100755 (executable)
@@ -420,11 +420,9 @@ def parse_body(request):
             (key, value) = line.strip().split(' ', 1)\r
 \r
             # Server (S) and Nick (n) fields can have international characters.\r
-            # We first convert to UTF-8, then to ASCII. Characters will be lost\r
-            # in this conversion for the sake of presenting what otherwise \r
-            # would have to use CSS sprites.\r
+            # We convert to UTF-8.\r
             if key in 'S' 'n':\r
-                value = qfont_decode(unicode(value, 'utf-8'))\r
+                value = unicode(value, 'utf-8')\r
     \r
             if key in 'V' 'T' 'G' 'M' 'S' 'C' 'R' 'W':\r
                 game_meta[key] = value\r