Ubuntu Study Notes-garbled Chinese Characters in gftp, locale, chmread
Source: Internet
Author: User
Ubuntu Study Notes-gftp Chinese garbled characters, locale, chmread -- Linux Enterprise Application-Linux server application information. For details, refer to the following. Because there are still many useful CHM files in windows, and I also like this kind of compiled documents for ease of searching, it is inevitable that how to view the CHM File in ubuntu is put on the agenda. The solution to this problem is very simple. google/linux found a lot after "CHM file format is opened" and was recommended by others to use CHMREAD, a FIREFOX plug-in written by Chinese people, small, flexible, and convenient. There is no problem with the installation. You do not need to search for the download page of the latest package again. In the FF menu: Tools-additional software-extensions-get extensions, you can enter the page and search for CHM READer, install the plug-in online (FF is a convenient plug-in and installation method ). After installation, open the CHM file from the File menu to unpack the file. To browse the directory information of a file and search for it, press Ctrl + E or in the menu: View-Sidebar-CHM Reader.
FTP garbled characters have been bothering me for a long time. I installed gftp, and Chinese files are always garbled when I log on to the windows FTP server, I often had to restart winxp to transfer Chinese files over FTP. I have known for a long time that this must be a problem with locale and character encoding, but I cannot solve it by referring to the various methods provided on the Internet. Some of these methods may be too old and not applicable, some because of different platforms, and some are written mistakes of the author. However, they are useless. Today, I am determined to solve it. As I 've done in the past few times, I 've been tossing around for a long time, and I 've been getting depressed. I 've changed my settings to N times, and the connection to the server is still a bunch of garbled characters. In addition, I tried to make a slight modification to one of the solutions. The original instructions and modifications are as follows:
Command: # vim/usr/bin/gftp
In #! /Bin/sh and add
Export LANG = zh_CN (changed to zh_CN.GBK)
Since GBK has not yet been generated on my system, I also benefited from using the introduction on the Internet to generate the corresponding character set:
Sudo locale-gen zh_CN.GBK
Then OK. You do not need to set remote character sets in gftp preferences. There is no need to install a patch or configure it as in some solutions. I think this is because in the gftp process, after the variable LANG is set to GBK, the character set can be consistent with that of the remote server, and the communication is normal. The priority of the LANG environment variables is lower than that of other locale variables, but it works. I think it may be because no other variables are set in the process.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service