Japanese Speaker. I can read/write some English but not well, so corrections are always appreciated.

プログラミングや音楽に興味があります。最近はEmacsでよく遊んでます。

  • 1 Post
  • 6 Comments
Joined 1 year ago
cake
Cake day: June 18th, 2023

help-circle





  • If you’re familar with Python, can you try this script? (please replace the string a and b with your input and the answer)

    $ python
    >>> import unicodedata
    >>> a = 'はい、 コンビニです。'
    >>> print('\n'.join(f'{hex(ord(c))}, {unicodedata.name(c)}' for c in a))
    0x306f, HIRAGANA LETTER HA
    0x3044, HIRAGANA LETTER I
    0x3001, IDEOGRAPHIC COMMA
    0x3000, IDEOGRAPHIC SPACE
    0x30b3, KATAKANA LETTER KO
    0x30f3, KATAKANA LETTER N
    0x30d3, KATAKANA LETTER BI
    0x30cb, KATAKANA LETTER NI
    0x3067, HIRAGANA LETTER DE
    0x3059, HIRAGANA LETTER SU
    0x3002, IDEOGRAPHIC FULL STOP
    >>> b = 'はい、コンビニです。'
    >>> print('\n'.join(f'{hex(ord(c))}, {unicodedata.name(c)}' for c in b))
    0x306f, HIRAGANA LETTER HA
    0x3044, HIRAGANA LETTER I
    0x3001, IDEOGRAPHIC COMMA
    0x30b3, KATAKANA LETTER KO
    0x30f3, KATAKANA LETTER N
    0x30d3, KATAKANA LETTER BI
    0x30cb, KATAKANA LETTER NI
    0x3067, HIRAGANA LETTER DE
    0x3059, HIRAGANA LETTER SU
    0x3002, IDEOGRAPHIC FULL STOP