You are not logged in.

#1 2022-03-22 01:29:47

Nan123
Member
Registered: 2021-01-24
Posts: 83

[Solved] Strange behavour of Japanese characters on new arch install

Hello,
I have just reinstalled Arch and am having some issues in the terminal with Japanese fonts, they will either not show at all or show as strange, what I assume to be Unicode characters, I already installed the adobe-source-han-sans-jp-fonts package to no avail, as well as restarting. This issue is consistent in alacritty, st and kitty. It happens with ls, ranger and ncmpcpp. They render properly in mpv and the terminal when mpv in launched. I copied a few folders from my .config into the new install, if that helps find the issue.. I have never ran into this issue before and am at a loss for why it is happening, here are some images of the issue:
https://files.catbox.moe/hotg4y.png https://files.catbox.moe/4mksj5.png
Any help would be greatly appreciated, thanks!

EDIT: don't use the wrong zsh file wink.

Last edited by Nan123 (2022-03-23 19:45:47)

Offline

#2 2022-03-22 02:33:24

mpan
Member
Registered: 2012-08-01
Posts: 1,630
Website

Re: [Solved] Strange behavour of Japanese characters on new arch install

What is the output of the locale command when you run it in that terminal? That resembles wrong locale settings.

Last edited by mpan (2022-03-22 02:39:27)

Offline

#3 2022-03-22 02:35:54

Nan123
Member
Registered: 2021-01-24
Posts: 83

Re: [Solved] Strange behavour of Japanese characters on new arch install

This is the output:

LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

I ran locale gens and all that during install, reading over the install page's locale section, everything looks right.

Last edited by Nan123 (2022-03-22 02:37:24)

Offline

#4 2022-03-22 02:41:32

mpan
Member
Registered: 2012-08-01
Posts: 1,630
Website

Re: [Solved] Strange behavour of Japanese characters on new arch install

Are you using or were using Plasma by any chance, and ever touched its locale settings? If yes, is there a “~/.config/plasma-localerc” file? If yes, remove it, log in again and see if the issue persists. And never use those settings again.

Otherwise: you haven’t configured your locale properly. Set the locale suitable for your system, one that has “.UTF-8” at the end of its name.

Offline

#5 2022-03-22 02:49:46

Nan123
Member
Registered: 2021-01-24
Posts: 83

Re: [Solved] Strange behavour of Japanese characters on new arch install

I never used Plasma, the locale is correct, The file is proper and I ran the localectl command, but it doesn't set the variables.

Offline

#6 2022-03-22 02:51:00

mpan
Member
Registered: 2012-08-01
Posts: 1,630
Website

Re: [Solved] Strange behavour of Japanese characters on new arch install

Clearly the locale is not correct, as indicated by the output of locale.

What’s the content of “/etc/locale.conf”?

Last edited by mpan (2022-03-22 02:51:53)

Offline

#7 2022-03-22 02:52:26

Nan123
Member
Registered: 2021-01-24
Posts: 83

Re: [Solved] Strange behavour of Japanese characters on new arch install

The syntax was, I needed to re-source after running that locale command so the variable updated, still not sure why it didn't work with the locale.conf file.

Offline

#8 2022-03-22 02:53:44

Nan123
Member
Registered: 2021-01-24
Posts: 83

Re: [Solved] Strange behavour of Japanese characters on new arch install

the output of catting it is:

LANG=en_US.UTF-8

EDIT: it also appears changes are undone on reboot, for whatever reason, so this issue is still happening.

Last edited by Nan123 (2022-03-22 02:58:06)

Offline

#9 2022-03-22 03:00:27

Nan123
Member
Registered: 2021-01-24
Posts: 83

Re: [Solved] Strange behavour of Japanese characters on new arch install

Running

unset LANG
source /etc/profile.d/locale.sh

fixes the issue until the next reboot, even without running the command to set locale, im extra confused now.

Last edited by Nan123 (2022-03-22 03:00:49)

Offline

#10 2022-03-22 03:03:56

mpan
Member
Registered: 2012-08-01
Posts: 1,630
Website

Re: [Solved] Strange behavour of Japanese characters on new arch install

“The changes undone” means that something changes “/etc/locale.conf”?

Offline

#11 2022-03-22 03:07:31

Nan123
Member
Registered: 2021-01-24
Posts: 83

Re: [Solved] Strange behavour of Japanese characters on new arch install

No, You can disregard that reply. Essentially, running the unset and source command after a boot fixes the issue until the next boot. I do have a getty rule to log me in and it starts an X session on boot, could that be an issue?

Last edited by Nan123 (2022-03-22 03:08:15)

Offline

#12 2022-03-22 03:09:37

mpan
Member
Registered: 2012-08-01
Posts: 1,630
Website

Re: [Solved] Strange behavour of Japanese characters on new arch install

You seem to be overrinding the LANG environment variable somewhere in the files sourced during your log-in or starting X. But which one it is no one can tell, as it was you who must’ve placed that assignment there and it may be anywhere.

Offline

#13 2022-03-22 03:11:52

Nan123
Member
Registered: 2021-01-24
Posts: 83

Re: [Solved] Strange behavour of Japanese characters on new arch install

I only wrote about 2 scripts and did this install 2-3 hours ago so ill have a look.

Offline

#14 2022-03-22 03:15:14

Nan123
Member
Registered: 2021-01-24
Posts: 83

Re: [Solved] Strange behavour of Japanese characters on new arch install

These are the only scripts I modified, outside of these the system is more or less vanilla and i don't see any implications of anything wrong here:

➜  ~  cat .zshenv
if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
	exec startx
fi
➜  ~  cat .xinitrc
exec i3
➜  ~  cat /etc/systemd/system/getty@tty1.service.d/autologin.conf
[Service]
ExecStart=
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --autologin nan - $TERM

Offline

#15 2022-03-22 07:06:02

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,268

Re: [Solved] Strange behavour of Japanese characters on new arch install

Don't use zshenv, but zprofile - where did you get that idea??
zshenv is sourced before everything else and the content replaces zsh w/ startx, so you're never getting to the point where zprofile and by this /etc/profile and so /etc/profile.d/locale.sh are sourced.


Also your xinitrc is broken (see the last link below)

Offline

#16 2022-03-23 19:45:00

Nan123
Member
Registered: 2021-01-24
Posts: 83

Re: [Solved] Strange behavour of Japanese characters on new arch install

I was half asleep during all of this. I did a fresh install,  even though now it appears its not necessary, and everything works. I honestly have no idea why I used zshenv, since I know better and with my next install I did it right, but regardless, thanks for helping me track the issue down since I was wondering the cause, Also, I fixed my xinitrc when I reinstalled ;).

Last edited by Nan123 (2022-03-23 19:48:10)

Offline

Board footer

Powered by FluxBB