skishore / makemeahanzi

Free, open-source Chinese character data
https://www.skishore.me/makemeahanzi/
Other
1.85k stars 464 forks source link

What is the meaning of the number in SVG file names? #16

Closed daotrungkien closed 7 years ago

daotrungkien commented 7 years ago

As the question in the title, what is the meaning of the number in SVG file names? I have no idea on how to map this number to the character code, or the character index in the word-list files.

Thanks!

mcfarljw commented 7 years ago

It is the unicode to decimal code point value. For example 你 would be 20320. You can check it using this tool:

https://r12a.github.io/apps/conversion/

skishore commented 7 years ago

That's right. The reason for using the codepoint instead of the unicode character is that some filesystems have trouble with non-ASCII names (for example, Android seems to). If you're using Javascript, you can get the codepoint of the character x as x.charCodeAt(0). I updated the README to include that information.