zoukankan      html  css  js  c++  java
  • 已知GBK的某段码表,码表对应的字符

      for i in range(0xA1A2,0xA1A5):                                                                                                 
            b1=i&0xFF;                                                                                                                 
            b2=i>>8;                                                                                                                   
            GBKChar1=chr(b2);                                                                                                          
            GBKChar2=chr(b1);                                                                                                          
            GBKChar=GBKChar1+GBKChar2;                                                                                                 
            print "%s %0X%0X"%(GBKChar,b2,b1);                                                                                        
        for i in range(0xA1AE,0xA1C0):                                                                                                 
            b1=i&0xFF;                                                                                                                 
            b2=i>>8;                                                                                                                   
            GBKChar1=chr(b2);                                                                                                          
            GBKChar2=chr(b1);                                                                                                          
            GBKChar=GBKChar1+GBKChar2;                                                                                                 
            print "%s %0X%0X"%(GBKChar,b2,b1);                                                                                        
        for i in range(0xA3A1,0xA3B0):                                                                                                 
            b1=i&0xFF;                                                                                                                 
            b2=i>>8;                                                                                                                   
            GBKChar1=chr(b2);                                                                                                          
            GBKChar2=chr(b1);                                                                                                          
            GBKChar=GBKChar1+GBKChar2;                                                                                                 
            print "%s %0X%0X"%(GBKChar,b2,b1);                                                                                        
        for i in range(0xA3BA,0xA3C0):                                                                                                 
            b1=i&0xFF;                                                                                                                 
            b2=i>>8;                                                                                                                   
            GBKChar1=chr(b2);                                                                                                          
            GBKChar2=chr(b1);                                                                                                          
            GBKChar=GBKChar1+GBKChar2;                                                                                                 
            print "%s %0X%0X"%(GBKChar,b2,b1)

  • 相关阅读:
    七牛云的 python sdk 是如何 批量删除资源的
    mysql 主从复制
    django3上线部署踩的坑
    基于linux在线预览
    数据库2
    数据库3
    安装 webstorm--->vue
    Django基础1
    pymysql基础
    前段之jQuery
  • 原文地址:https://www.cnblogs.com/finallyliuyu/p/5587194.html
Copyright © 2011-2022 走看看