'GB2312'에 해당되는 글 1건

  1. 2008/06/04 자루 GB2312 테이블 만들기

GB2312 테이블 만들기

python 2008/06/04 13:44 자루
lines = []
for high in xrange(0, 0xff):
    highPart = high << 8
    line =""
    for low in xrange(0, 0xff):
        lowPart = low
        data = u"%c" % (highPart | lowPart)
        try:
            data.encode("gb2312")
        except UnicodeError:
            continue

        line += data

    if line:
        lines.append(line.encode("utf8"))

open("gb2312.txt", "w").write("\n".join(lines))

GB2312 테이블
2008/06/04 13:44 2008/06/04 13:44
TAG ,
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://myevan.net/rss/response/109

댓글+트랙백 ATOM :: http://myevan.net/atom/response/109