Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/knz/ucd
Unicode Character Database in various formats
https://github.com/knz/ucd
Last synced: 26 days ago
JSON representation
Unicode Character Database in various formats
- Host: GitHub
- URL: https://github.com/knz/ucd
- Owner: knz
- License: unlicense
- Created: 2013-10-14T12:13:16.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-14T12:32:58.000Z (about 11 years ago)
- Last Synced: 2024-05-02T00:13:08.931Z (6 months ago)
- Language: Python
- Size: 1.29 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
UCD Name database
=================This repository offers the mapping between Unicode code points and
their standard name in various formats:- ``ucd.json``: JSON (RFC 4627, ECMA-404)
- ``ucd.html``: HTML
- ``ucd.h``: C/C++ header file, with preprocessor macro definitions
- ``ucd.py``: Python moduleThe data is converted from the official Unicode Character Database (http://www.unicode.org/ucd/).
See the ``tables`` subdirectory for the generated files.You can use the Python module as follows:
- you know a character's name, you want to know its code.
For example, you want to know which code corresponds to "COMET":
.. code:: python
import ucd
print (hex(ucd.COMET)) # should print 2604# alternatively:
name = "COMET"
print (hex(getattr(ucd, name)))- you know the character's code, you want to know its name.
For example, you want to know what is the standard name of character
0x262f:.. code:: python
import ucd
print (ucd.names[0x262f]) # should print YIN YANG