Home>Article>Operation and Maintenance> How to solve the garbled problem of suse linux

How to solve the garbled problem of suse linux

藏色散人
藏色散人 Original
2021-11-19 14:52:05 2290browse

suse Linux garbled solution: 1. Check the encoding through the locale command; 2. Modify the language file; 3. Install zhcon; 4. Select the "encoding method" as GB2312 or GBK.

How to solve the garbled problem of suse linux

#The operating environment of this article: linux5.9.8 system, Dell G3 computer.

How to solve suse linux garbled code problem?

SUSE Linux garbled code problem solution

Problem:

The program written in X window Garbled characters appear when running on the terminal, and garbled characters appear when running on the console.

Solution:

1. Make sure the internal code of the system is Chinese encoding: such as GBK, GB2312, etc. You can pass locale command to check, if not, you can modify it. Start the Yast2 control center, open "System" -> "/etc/sysconfig Editor", expand the "System ->Environment ->Language" item in turn, and Change the values of all items starting with RC to GB2312. (You can also directly modify the /etc/sysconfig/language file).

2. Install the zhcon Chinese plug-in.

zhcon is An efficient double-byte Chinese/Japanese/Korean (CJK) virtual terminal that works under the Linux console, just like UCDOS in a DOS environment, provides a complete double-byte language environment for the console environment. Please note before downloading and using: zhcon is not suitable for X Window terminal. In X Window, you can choose cxterm or rxvt as the Chinese terminal. zhcon is a plug-in platform. Unlike the Chinese kernel, it does not require patching the Linux kernel. Just like ordinary Linux software, you can easily install zhcon directly. After executing zhcon on the main console, you can enter the Chinese platform, or you can exit and return to the Spanish state at any time. zhcon is free software that follows the principles of the GPL, because there is no reason for anyone to pay to use their native language.

Official website: http://zhcon.sourceforge.net/index_cn.html, where there are source code packages and binary rpm packages.

After installing zhcon, run it first, zhcon, It will display some prompt information, which simulates a shell. Then run your own program, and the Chinese will be displayed normally.

3. There is a menu item on the terminal

under the X window "Terminal" option, select "Encoding method" as GB2312 or GBK and it will be OK.

Recommended learning: "linux video tutorial"

The above is the detailed content of How to solve the garbled problem of suse linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn