You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import strutils
import unicode
import unicodedb/names
templateechoRune(n: int) =let name =Rune(n).name
if name.len >0:
echo"U+", toHex(n, 4), "", name
for n in0..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
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.
output:
from: https://forum.nim-lang.org/t/8164
The text was updated successfully, but these errors were encountered: