Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing names for Runes from 0 to 0X1F #17

Open
pietroppeter opened this issue Jun 28, 2021 · 1 comment
Open

missing names for Runes from 0 to 0X1F #17

pietroppeter opened this issue Jun 28, 2021 · 1 comment

Comments

@pietroppeter
Copy link

import strutils
import unicode
import unicodedb/names

template echoRune(n: int) =
  let name = Rune(n).name
  if name.len > 0:
    echo "U+", toHex(n, 4), " ", name

for n in 0 .. 0x2A:
  echoRune(n)
echo "..."
echoRune(0x03B1)

output:

U+0020 SPACE
U+0021 EXCLAMATION MARK
U+0022 QUOTATION MARK
U+0023 NUMBER SIGN
U+0024 DOLLAR SIGN
U+0025 PERCENT SIGN
U+0026 AMPERSAND
U+0027 APOSTROPHE
U+0028 LEFT PARENTHESIS
U+0029 RIGHT PARENTHESIS
U+002A ASTERISK
...
U+03B1 GREEK SMALL LETTER ALPHA

from: https://forum.nim-lang.org/t/8164

@nitely
Copy link
Owner

nitely commented Jul 4, 2021

It seems those characters don't have their name defined in the UnicodeData.txt name field. Some of them have it in Unicode_1_Name field, though. But it seems Name_Aliases.txt is the right file to get those names from.

FWIW, Python throws an error when getting those characters names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants