Two different versions of 直?

Are there two very different ways to write the kanji
image ?

I am using jisho and wanikani in Firefox on Ubuntu. Both show me the kanji as above. But when I type it here in the forum, I get image .

Is this a question of fonts? My font setting in Firefox for Japanese is Noto Sans CJK JP.

1 Like

Something to do with Chinese fonts.

2 Likes

My font settings in Firefox are:
image
I would expect the WK community page to explicitly set the font type to Japanese and not Chinese?

Yeah, the one you’re seeing on the forum is the Chinese version. I don’t use Firefox, I use Chrome, and I get the Japanese version here.

2 Likes

Yes. I can confirm that in Chrome I get the Japanese version, and I couldn’t even find language specific font settings. So my system settings seem to be OK (I also get the Japanese version while typing in an editor or in the shell).

I’m typing this in Firefox (on a Mac, though) and at least in the editor 直 is the Japanese one. Let’s see how it turns out once I submit it…

EDIT: It is still the Japanese one for me after it is posted.

2 Likes

Interesting, I’m on chrome on android and 直 shows up as the Chinese version for me, even though the Japanese keyboard suggestion was showing the Japanese version.

Does anyone know how to set chrome fonts on mobile? :thinking:

ETA: FWIW, my language settings include Japanese as one of several languages, but not Chinese

1 Like

A short summary so far:
Chrome on Android (as reported by @kelitt) behaves the same way as Firefox on Ubuntu.

To complete the confusion:
Firefox on Android gives the Japanese version.
Chrome on my Android gives the Japanese version, too.

Very strange …

Î had this same problem on Ubuntu until I installed some japanese-font packages, I think. You can try that. Have you checked in the web page inspector what fonts are being rendered, since the page can affect it?

EDIT: I think the package was language-pack-ja.

3 Likes

I’m using Firefox on Windows laptop and I got the one with the “L” under the “eye” in my lessons. But as I use the Jitai-script it got changed to 直 when it changed to a different font than the standard one. Totally confused me in my last review.

Unfortunately it was already installed:

$ sudo apt-get install language-pack-ja
Reading package lists… Done
Building dependency tree
Reading state information… Done
language-pack-ja is already the newest version (1:20.04+20200709).

1 Like

No, as far as I know, HTML elements can only have one language specified. The community page is set to US English using <html lang="en-US" ...>. The WK team could probably change a setting in Discourse to let it be <html lang="ja-JP" ...>, but that would be wrong since ~99% of the forum is in English. So the settings in your screenshot won’t have any influence as long as your webbrowser doesn’t identify the language as being Japanese.

When your webbrowser has to display a kanji, it has to guess what language it is. If the text is within an HTML element that has lang="ja-JP" specified, this is easy. Otherwise, it has to look for other hints – maybe the system language, maybe the languages you have specified as your preferred languages within the webbrowser, etc.

Screenshots of browser settings

I’m on Windows, and Chromium-based Edge displays (the Chinese version) until I add Japanese as a preferred language:

My Firefox already guessed by default that it’s Japanese (maybe because I have an IME installed?), but I still experimented with the language settings:


When I added Chinese, Firefox switched to the Chinese kanji.

Of course, you also need a Japanese font installed on your system, otherwise the webbrowser still has to fall back to a Chinese font.

Ideally, everyone posting text in a different language than the page’s default US English would enclose it in an HTML element with the correct language specified: <span lang="ja-JP">直</span>, but that’s pretty cumbersome. That’s why I let my IME2Furigana userscript add lang="ja-JP" automatically to every ruby-element. #ad

4 Likes

It happens also in the browser’s tab and in the URL display, so I suppose it is not a setting in the page, but of the browser or system.

Okay, how about firefox-locale-ja?

Was already installed.

$ sudo apt install firefox-locale-ja
Reading package lists… Done
Building dependency tree
Reading state information… Done
firefox-locale-ja is already the newest version (81.0+build2-0ubuntu0.20.04.1).

YES!! Adding Japanese as preferred language did it after a restart of Firefox (see Tab and URL below). Thank you!
image

3 Likes

I have no idea what happened but I checked again on my phone and it’s now displaying the japanese version? I don’t think I changed anything :sweat_smile:

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.