Couple of misc utf8, base64 python tests.

This commit is contained in:
Joel Martin
2011-04-12 22:39:28 -05:00
parent 8765971e06
commit 76e25898bb
2 changed files with 48 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/python
'''
Display UTF-8 encoding for 0-255.'''
import sys, os, socket, ssl, time, traceback
from select import select
sys.path.insert(0,os.path.dirname(__file__) + "/../utils/")
from websocket import WebSocketServer
if __name__ == '__main__':
for c in range(0, 256):
print "%d: %s" % (c, repr(WebSocketServer.encode(chr(c))[1:-1]))
#nums = "".join([chr(c) for c in range(0,256)])
#for char in WebSocketServer.encode(nums):
# print "%d" % ord(char),
#print repr(WebSocketServer.encode(nums))