News for hackers. Stuff that matters.
Re:Displaying Japanese and English Text on the Web by Grue3 on Friday February 08, 2019 @04:47PM (#19118999)
I had a lot of problems making Japanese text on ichi.moe display correctly. I'm using lang="ja" instead of lang="ja-jp" though, it seems to work and is shorter. The main problem with Japanese characters displayed in Chinese font (which happens when lang property is not set explicitly) is that some characters are barely recognizable as the same character. Compare 誤 in a Chinese font and a Japanese font. [1] Yep, this is the same character according to Unicode. Imagine if Latin letter g, Cyrillic г and Greek 𝛾 had the same Unicode codepoint.

[1] https://en.wiktionary.org/wiki/%E8%AA%A4

Re:Displaying Japanese and English Text on the Web by bgee on Friday February 08, 2019 @05:55PM (#19119463)
Can you explain more about the 誤 example you provided?

When you say it's barely recognizable, do you mean simplified vs traditional? Because to me (as a native Chinese speaker) the Japanese and traditional look almost identical. I can't comment on traditional vs simplified because I can read both.

If it's simplified vs traditional, I wonder why OS/browser prefers to render the character in simplified form (I assume the Chinese font you are using has both styles).

Re:Displaying Japanese and English Text on the Web by Grue3 on Saturday February 09, 2019 @03:21AM (#19121323)
For reference this is what I see in my browser: https://imgur.com/a/F3pFzCm
Re:Displaying Japanese and English Text on the Web by fenomas on Friday February 08, 2019 @09:32PM (#19120330)
> the Japanese and traditional look almost identical

They have different radicals on the lower right. Unless there's some reason to consider the two radicals equivalent (there isn't in JP, I wouldn't know about CN) they're different characters.

Re:Displaying Japanese and English Text on the Web by titanix2 on Friday February 08, 2019 @10:23PM (#19120490)
Still it’s the same character. Enjoy the 16 others variants: http://dict.variants.moe.edu.tw/variants/rbt/word_attribute....
Re:Displaying Japanese and English Text on the Web by fenomas on Saturday February 09, 2019 @12:26AM (#19120941)
They are considered variants of each other for linguistic reasons, but that's not what GP was talking about. GP suggested the characters look almost identical, and I'm pointing out that they clearly don't.
Re:Displaying Japanese and English Text on the Web by fireattack on Friday February 08, 2019 @05:22PM (#19119248)
lang="ja" absolutely should work [1], so I have no idea why it doesn't on your website.

Maybe it's related to font you specified which may directly or indirectly (fallback) cause the problem. After all, `font-family` overrides language (which essentially just helps to get the right font(s)).

If you don't mind to provide a test page I can help debugging.

[1]: https://en.wikipedia.org/wiki/User:Fireattack/sandbox

Re:Displaying Japanese and English Text on the Web by Grue3 on Saturday February 09, 2019 @03:16AM (#19121302)
You misunderstood me, it does work on my website, I just had to do a lot of work to insert this attribute in all the right places where Japanese text can be displayed.
Re:Displaying Japanese and English Text on the Web by fireattack on Sunday February 10, 2019 @09:04PM (#19131546)
Ah you're right, sorry!