News for hackers. Stuff that matters.
Re:Katakana, Hiragana, and Unicode by innocenat on Wednesday September 28, 2022 @01:07PM (#33010379)
To be honest, both questions can be answered in a few seconds by looking at the code point table for Hiragana/Katakana if you already know Japanese. Hence, that's why nobody write about it.

> How do the 46 characters map into the 90 characters?

Because there are actually more than 46 characters.

> Do they map the same way for both hiragana and katakana?

Yes. That's also how we do conversion between hiragana and katakana. By adding/subtracting 0x60.

Re:Katakana, Hiragana, and Unicode by lloeki on Wednesday September 28, 2022 @01:31PM (#33010679)
For someone like me who knows somewhere between pretty much none to a very small bit of Japanese and slowly working my way up as time permits in a busy life, this was an interesting and very well presented article, saving me more than a few seconds of searching that I don't have to spare, and for which the reading time was both enjoyable and knowledge incrementing.

Hence, that's very much fortunate that someone wrote about it.

Re:Katakana, Hiragana, and Unicode by innocenat on Wednesday September 28, 2022 @01:37PM (#33010754)
I don't disagree about that. I just answered the first question in the article about why there are no one writing about this.
Re:Katakana, Hiragana, and Unicode by spacehunt on Wednesday September 28, 2022 @01:58PM (#33011033)
Another simple technical reason is that that's how JIS did it, and Unicode wants to have lossless round-trip encoding conversions in order to promote its adoption in East Asia at the time.
Re:Katakana, Hiragana, and Unicode by dhosek on Wednesday September 28, 2022 @03:34PM (#33012216)
There are some interesting variations in different scripts thanks to how they were handled in pre-Unicode encodings. Perhaps the most interesting divergence is in the various scripts derived from the old Brahmi script. These are all abugidas (as are the Japanese kana) where vowels do not exist independently of consonants. But in Thai, for example, the syllable NA is written นา with น and า treated as separate characters, while in Devanagari, NA is written ना where न is the N sound and the A sound ा is a spacing mark which changes the shape and spacing of the first letter to give ना. Although a Thai reader will read the combination of consonant and vowel as a single entity, they are treated as two graphemes by Unicode, while the equivalent in Devanagari is a single grapheme (and it’s not simply because they’re printed connected since नाना will be connected but treated as two graphemes).

Perhaps most interesting in this respect is the comparison between the Devanagri ि and the Thai ใ which both appear before the consonant that they’re attached to, but in Thai the input will be ใ + ค to get ใค (so you input in the order of appearance rather than the order of pronunciation) while in Devanagari, the input would be क + ि to get कि (so you input in pronunciation order rather than graphic order).

Re:Katakana, Hiragana, and Unicode by innocenat on Wednesday September 28, 2022 @09:36PM (#33015352)
Japanese Kana is syllabaries, not abugidas.
Re:Katakana, Hiragana, and Unicode by inkyoto on Wednesday September 28, 2022 @10:40PM (#33015730)
> … in Thai, for example, the syllable NA is written นา with น and า treated as separate characters, while in Devanagari, NA is written ना where न is the N sound and the A sound ा is a spacing mark which changes the shape and spacing of the first letter to give ना.

Worth noting that «-a» is often implied and both, Thai and Devanagari (and in nearly all other Brahmi and Pali derived scripts), and is implicitely derived by the language speaker, and therefore is dropped from the spelling most of the time except for specific cases.

Re:Katakana, Hiragana, and Unicode by innocenat on Thursday September 29, 2022 @01:56AM (#33016963)
-a sound (ะ) isn't dropped in Thai in most case. It's only dropped in specific cases, mostly from words with Pali/Sanskrit origin.
Re:Katakana, Hiragana, and Unicode by superjan on Wednesday September 28, 2022 @01:16PM (#33010489)
For curiosity: how are they sorted? Are hiragana/katakana symbols considered equivalent?
Re:Katakana, Hiragana, and Unicode by zerocrates on Wednesday September 28, 2022 @02:53PM (#33011749)
The hiragana and katakana and various versions thereof for each mora all share the same "primary" Unicode collation value. Adding a dakuten or handakuten creates a secondary difference: e.g. は (ha) < ば (ba) < ぱ (pa).

As between the versions for the same mora, they get sorted with tertiary differences as: hiragana comes before katakana, small comes before regular-size, and for katakana regular width comes before halfwidth. There's also a "circled" set of the katakana that sort after the halfwidth ones.

So they're equivalent (or not) depending on how you're doing the collation/comparison.

Re:Katakana, Hiragana, and Unicode by innocentoldguy on Wednesday September 28, 2022 @01:42PM (#33010814)
The article shows how they are sorted. Hiragana is used for things like Japanese words, particles, names, and to conjugate verbs. Katakana is used for things like foreign words, names, and sometimes emphasis. Both writing systems describe the same phonetics. For example, the hiragana か and katakana カ are both pronounced “ka.”
Re:Katakana, Hiragana, and Unicode by Pxtl on Wednesday September 28, 2022 @03:44PM (#33012311)
I'm surprised they're both used, from that description it sounds like one would fall by the wayside, like cursive has in North America.

...

That said, culturally Japan seems like exactly the kind of place where, were they English-speakers, all the kids would absolutely be required to learn perfect cursive.

Re:Katakana, Hiragana, and Unicode by bsder on Wednesday September 28, 2022 @05:18PM (#33013410)
> I'm surprised they're both used, from that description it sounds like one would fall by the wayside, like cursive has in North America.

Katakana, hiragana, and kanji are all in active use--that's why they don't fall away.

Kanji are your primary word base. They are sort of like root words in English.

Hiragana often serves as kind of a marker--endings of certain words as well as phrase markers (particles). These are particularly important because Japanese does not normally break words with spaces.

Katakana often denotes a foreign phonetic word or foreign names. Login is particularly good example for this forum: ログイン (ro-gu-i-n).

Japanese speakers actively use the differences as cues when reading. Watch a native Japanese speaker try to puzzle out Japanese learning materials for non-native speakers. If everything is written in hiragana (not uncommon for beginning materials), native speakers often have to puzzle over things a bit before they work out what a sentence says. This is one of the reasons why you want to get to Kanji as fast as possible when learning Japanese--the differences in script are important for reading comprehension.

You can see all of these in play on the Asahi Shimbun webpage: https://www.asahi.com/

Re:Katakana, Hiragana, and Unicode by popularonion on Wednesday September 28, 2022 @06:36PM (#33014112)
Japanese people could ask the same question about why English continues to have uppercase and lowercase letters.

Actually when you look at the use of English in Japanese media, you’ll quickly notice a lot of unnatural-looking overuse of uppercase. That’s because to them it feels natural to use uppercase the same way they use katakana.

Re:Katakana, Hiragana, and Unicode by msbarnett on Wednesday September 28, 2022 @04:01PM (#33012517)
> I'm surprised they're both used, from that description it sounds like one would fall by the wayside, like cursive has in North America.

In practice, there are no less than 4 separate scripts that are used in Japanese: hiragana, katakana, kanji, and romaji, and some mix of all 4 can appear in the same sentence.

It's not so much analogous to cursive, which is a different "style" of writing the same "thing" – katakana and hiragana developed at different times for different groups and came to play different roles, and there are (usually) semantic implications to which are used.

Re:Katakana, Hiragana, and Unicode by dfinninger on Wednesday September 28, 2022 @04:50PM (#33013090)
I am very early on in my Japanese-learning journey. So if others contradict me, they are probably a better source. :)

But from what I understand Hirigana is used more for Japanese words, and Katakana more for loan words from other languages.

It actually leads to a nice shortcut for some words. If I’m reading Hirigana I’ll try to match that with words in Japanese that I know. However, if the word I’m looking at is Katakana, I’ll flip that off and start trying to match phonetically.

I assume with fluency this all becomes automatic, but I’m a ways off from that yet!

Re:Katakana, Hiragana, and Unicode by hinoki on Wednesday September 28, 2022 @08:30PM (#33014937)
My understanding is that katakana is used for situations where it’s the sound that is important, not necessarily the meaning. So it’s used for loan words, but also for onomatopoeia, and when writing your name down on a waitlist at a restaurant. (Often it is not clear how to pronounce a name from how it is written)
Re:Katakana, Hiragana, and Unicode by enqk on Thursday September 29, 2022 @03:07AM (#33017383)
Katakana is also used for the names of animals. Even when the name is native japanese.
Re:Katakana, Hiragana, and Unicode by innocentoldguy on Thursday September 29, 2022 @06:51PM (#33028408)
The reverse is true for words like たばこ (tobacco). It's a foreign word but is almost always spelled using hiragana.
Re:Katakana, Hiragana, and Unicode by hinoki on Thursday September 29, 2022 @03:45AM (#33017624)
Yes! Sushi menus are often entirely in katakana.
Re:Katakana, Hiragana, and Unicode by teek on Thursday September 29, 2022 @08:56PM (#33029473)
This is not correct. Sushi menus for restaurants in Tokyo use a mixture of kanji, hiragana, and katakana.
Re:Katakana, Hiragana, and Unicode by smsm42 on Thursday September 29, 2022 @12:59AM (#33016580)
Yes, but Katakana is also sometimes AFAIK used for spelling out words that otherwise would be written with kanji, and sometimes for emphasis (like italics in Latin script).
Re:Katakana, Hiragana, and Unicode by AnIdiotOnTheNet on Wednesday September 28, 2022 @04:50PM (#33013077)
English print still has two separate character sets with exactly the same pronunciation too. One is use most of the time, and the other is used to start sentences, for EMPHASIS on whole words, or to indicate proper nouns.
Re:Katakana, Hiragana, and Unicode by layer8 on Wednesday September 28, 2022 @04:08PM (#33012614)
It’s more akin to italics in usage than to cursive.
Re:Katakana, Hiragana, and Unicode by rippercushions on Wednesday September 28, 2022 @07:23PM (#33014477)
A very rough equivalence would be that hiragana is a regular typeface, while katakana is italics.
Re:Katakana, Hiragana, and Unicode by innocenat on Wednesday September 28, 2022 @01:34PM (#33010713)
They are sorted by dictionary order (五十音順 gojuuonjun) and there are no duplicated symbols in hiragana-katakana blocks.