turned out this blocked CJK characters too. stick to ASCII control char ban only, do NOT include UTF-8 control chars
authorsheepluva
Thu, 23 Jan 2014 14:18:06 +0100
changeset 10062 8ef80bd0402f
parent 10061 b7161f00a6ca
child 10063 52e293f14977
turned out this blocked CJK characters too. stick to ASCII control char ban only, do NOT include UTF-8 control chars
gameServer/Utils.hs
--- a/gameServer/Utils.hs	Thu Jan 23 13:56:53 2014 +0100
+++ b/gameServer/Utils.hs	Thu Jan 23 14:18:06 2014 +0100
@@ -58,7 +58,7 @@
 illegalName :: B.ByteString -> Bool
 illegalName s = B.null s || B.length s > 40 || B.all isSpace s || isSpace (B.head s) || isSpace (B.last s) || B.any isIllegalChar s
     where
-        isIllegalChar c = c `List.elem` ("$()*+?[]^{|}" ++ ['\x00'..'\x1F'] ++ ['\x7F'..'\x9F'])
+        isIllegalChar c = c `List.elem` ("$()*+?[]^{|}\x7F" ++ ['\x00'..'\x1F'])
 
 protoNumber2ver :: Word16 -> B.ByteString
 protoNumber2ver v = Map.findWithDefault "Unknown" v vermap