SUMMARY Chinese file names become random strings when using the "ls" command and in many other applications. Looks like the encoding is wrong. This only happens in X11, in Wayland, everything worked fine. Many other applications are affected, such as LibreOffice and Python3. LibreOffice displays the file name on its title bar and it becomes a random string. The os.listdir() in Python3 also produce random strings. I guess the system is making wrong assumptions about what encoding those applications use. STEPS TO REPRODUCE 1. create a new folder, cd into it, create a new file named "测试.txt" 2. run ls ./ OBSERVED RESULT the file name becomes "'��'$'\213''��'$'\225''.txt'" EXPECTED RESULT It should not become a random string SOFTWARE/OS VERSIONS Operating System: Fedora Linux 37 KDE Plasma Version: 5.26.5 KDE Frameworks Version: 5.102.0 Qt Version: 5.15.8 Kernel Version: 6.1.10-200.fc37.x86_64 (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Core™ i5-9300HF CPU @ 2.40GHz Memory: 7.7 GiB of RAM
Turned out to be some per-user settings messed up the charmap. Solved after deleting all user config files.