Code Monkey home page Code Monkey logo

character_encoding's Introduction

字符编码查询

Pylint

此项目用于查询某个字符的编码(或编号)。

需求

由于使用了标准库tomllib,所以需要Python >= 3.11

pip install -r requirements.txt

支持

目前支持的字符集和编码有:

  • ASCII
  • Unicode
  • GB/T 2312《信息交换用汉字编码字符集 基本集》
  • GB 18030《信息技术 中文编码字符集》
  • 《通用规范汉字表》
  • 大五码(Big5)
  • 《常用國字標準字體表》
  • 《次常用國字標準字體表》
  • Shift JIS
  • EUC-KR

脚本使用

命令行查询

get_encoding.py为基础脚本,在命令行中输出查询结果。

脚本运行后会提示输入单个字符,若不满足则需重新输入。

输出结果示例如下:

ASCII:未收录
Unicode: U+9AD1

GB/T 2312:0xF7C7
(87区39位,第二级汉字)
GB 18030:0xF7C7
《通用规范汉字表》: 6472(二级字)

Big5:0xC5EA(常用汉字)
《常用國字標準字體表》: 未收录
《次常用國字標準字體表》: 5880

Shift JIS:0xE991

EUC-KR:未收录

生成图片

output_image.py用于生成含有查询结果的图片,需要引入get_encoding.py来获取结果。

配置文件名为configuration.toml,位置与脚本同级。

输出图片位置默认为脚本同级目录下的output文件夹中。

图片使用字体为思源宋体天珩全字库Apple Color Emoji for Linux,需要存放在脚本同级目录下的fonts文件夹中。

生成图片样式如图所示: Sample Sample Sample

反馈

遇到的问题和功能建议等可以提出议题(Issue)。

欢迎创建拉取请求(Pull request)。

character_encoding's People

Contributors

skyeye-fast avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.