hkscs unicode converter
v1.1.0
HKSCS-Unicode-Converter是将分配给Unicode的私有使用区域的HKSCS字符在Unicode 4.1中转换为等效物的实用程序。受同名NPM模块的启发。
> >> from hkscs_unicode_converter import converter
> >> converter . convert_string ( "亂廿四" ) # Convert an entire string
'亂噏廿四'
> >> converter . convert_char ( "" ) # Convert a single character
'嘅'
> >> converter . convert_char ( chr ( 0xE7D4 )) # Convert from codepoint
'啱'
> >> converter . convert_char ( " uE7D4 " ) # Convert from Unicode literal
'啱'
> >> hex ( ord ( converter . convert_char ( chr ( 0xE7D4 )))) # Get corresponding codepoint
'0x5571' HKSCS-Unicode-Converter可在PYPI上获得,并正式支持Python 3.7+:
$ python3 -m pip install hkscs-unicode-converter 测试位于HKSCS_UNICODE_CONVERTER子模块中。测试使用TOX来自动化环境管理和内置的Unittest框架以运行测试。
$ tox 在承诺掌握之前跑黑色!