This specification defines how to implement general-purpose Kana transliterators.
A conforming implementation MUST use the steps to convert a string into Katakana to implement Hiragana to Katakana conversions, or the steps to convert a string into Hiragana to implement Katakana to Hiragana conversions.
To convert a string into Katakana with string input, run these steps:
To convert a string into Hiragana with string input, run these steps:
To normalize a Kana string input, run these steps:
To transliterate a string input with mapping table, run these steps:
Tables referenced from this specification are defined in the maps.json
data file
https://github.com/manakai/data-chars/blob/master/data/maps.json
(documentation: https://github.com/manakai/data-chars/blob/master/doc/maps.txt),
which is a normative part of this specification.
The JSON data file contains several mapping tables, identified by a name, containing entries from code points to code points. For the purpose of this specification, they are considered as maps of string to string entries with following names:
These tables will be updated when new Kana characters are added to the Unicode Standard. Implementations SHOULD be prepared for updating their tables.
This specification depends on the Infra Standard https://infra.spec.whatwg.org/. The terms for each, while, code point, length, string, append, ordered map, entry, and exists are defined by the Infra Standard.
This section is non-normative.
There are test data:
Per CC0 https://creativecommons.org/publicdomain/zero/1.0/, to the extent possible under law, the author of this specification has waived all copyright and related or neighboring rights to this specification.
This section is non-normative.
See 平仮名と片仮名 for rationale.