Home> System Tutorial> LINUX> body text

Linux files are garbled. 'Linux common commands' is a simple, fast and practical method to operate.

WBOY
Release: 2024-04-02 08:13:01
forward
679 people have browsed it

linux文件乱码 “linux常用命令”操作简单快捷实用性强的方法

This article mainly explains "how to solve the problem of garbled files in some files under the Linux operating system". Interested students may wish to take a look. The method introduced in this article is simple and quick to operateLinux file garbled, and is highly practical. Let the editor take you to learn "how to solve the problem of garbled files under the Linux operating system"!

The original Windows rar compressed file is LINUX community. After decompressing it under the Linux system and opening the file next to it, the contents are all garbled.

The reason why garbled characters appear is because some of the compressed files are named in English. The encoding of English under Windows is usually gbk, while the encoding of English under Linux is usually utf8, so files that are opened normally under Windows are likely to be garbled under Linux.

The solution is: use the iconv command to convert the file content encoding. For example, I have a file "Linux Common Commands" that opens normally under Windows, but garbled characters when opened under Linux. The solution is to enter in the terminal:

iconv-fgbk-tutf8linux common commands.txt>linux common commands.txt.utf8

Then open the file "Linux Common Commands.txt.utf8" and the garbled code problem seen in this article will be solved.

At this point, I believe you have a deeper understanding of "how to solve the problem of garbled files in some files under the Linux operating system". You might as well come and practice it! Here is the Yisu Cloud website. For more related content, you can enter the relevant channels to querylinux file garbled. Follow us and continue to learn!

The above is the detailed content of Linux files are garbled. 'Linux common commands' is a simple, fast and practical method to operate.. For more information, please follow other related articles on the PHP Chinese website!

source:itcool.net
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!