In western languages, if we need to emphasize some words, or mark something to be special, we use ALL UPPER CASE to do that even when the word is normally written with lower case. While in Japanese, we can write that word in katakana even when the word is normally written with hiragana.

Does this fact mean, when doing computer programming, we can treat hiragana as a lower case letter, and katakana as an upper case letter. For example, are the following algorithms appropriate for a Japanese user?

  • A procedure converting a sentence to all upper case converts all hiragana characters to katakana inside, and a procedure converting a sentence to all lower case converts all katakana characters to hiragana chracters.
  • When naming variables in camelCase, if the variable name is in Japanese, use a katakana at the beginning of a word, and a hiragana otherwise
  • In terms of password complexity requirement, e.g. at least 1 upper case and 1 lower case, count hiragana as lower case and katakana as upper case when the user enters Japanese as password.
  • Is it even possible to use hiragana and katakana in passwords? Considering that they are most typically entered using romaji.
    – Leebo
    Dec 31, 2018 at 5:06
  • 2
    for most major programming languages, the code is written using the roman alphabet, so most of your analogy is moot.
    – virmaior
    Dec 31, 2018 at 5:44

1 Answer 1


No, they are very much different.

Katakana is primarily used for writing foreign loanwords and foreign names, as well as onomatopoeia; mixed hiragana/kanji is used for all else. Writing a sentence all in katakana doesn't sound like SHOUTING, it sounds like the speaker has a foreign accent; mixed kanji and katakana sounds archaic (as that was the convention for certain kinds of official documents pre-1946).

As to your equivalence algorithms, no, it would not be helpful. To answer each point in turn:

  • Converting all hiragana to katakana results in a very odd-looking sentence; one which you might only find in fiction (see above for why). You would never want to convert all katakana to hiragana, as there are many common words that are (nearly) always written with katakana - and converting them to hiragana makes it harder to visually separate them from the surrounding text (since Japanese has no spaces). All-hiragana text at best looks like a children's book, if there are no kanji; all-hiragana, no kanji and no spaces is basically unreadable.

  • Katakana and hiragana are never mixed inside a single word (unless you're going for an ExTremElY sTRanGe eFFEct). There is nothing in Japanese analogous to initial capitalisation.

  • Passwords in actual Japanese script are very rare, and would likely confuse Japanese users more than simply requiring Roman letters. If you did want to allow them, you shouldn't have a requirement to mix hiragana and katakana, largely because of the above reasons. (IMO, you shouldn't require a mix of capitals and lower case in English passwords, as the strongest passwords I use are all lowercase letters and spaces - they're strong by length and very easy to remember - and it's very annoying to have to alter them to meet each site's individual password requirements.)

  • Katakana can't be used for capital letters but can be used for bold/italics?
    – BCLC
    Nov 23, 2022 at 15:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .