Linux System file name content is URF8 encoding, Windows system file name defaults to GBK encoding, most documents using GBK encoding, the system uses UTF8 code
No garbled characters caused by Chinese input method
1, IBUs Input method
Ubuntu system has been installed since the IBUs input method, in the English environment by default does not start. Configure IBUs to automatically start by selecting system---Preferences---startup applications on the Ubuntu system menu, add a program to the window:
Name:ibus-daemon
command:ibus-daemon-d-x-r
IBUs By default, the Chinese input method is more retarded and requires additional installation Ibus-pinyin, as follows:
sudo apt-get install Ibus-pinyin
At this point, you also need to start the Ibus-pinyin input method. On the Ubuntu System menu, select the system---Preferences---IBus Preferences, select Add in the "Select an Input Method" drop-down box in the Input Method page Chinese–pinyi N, the icon has a large "spell" that one, and then click the Add button, and finally through the up button to move the input method to the top. After the system restarts, the IBUs input method can be paged out by CTRL + Space. The IBUs input method is generally good, but in my environment it is not able to be paged out in some Java programs, such as NetBeans, Openproj.
2, Fcitx Input method
Because of IBUs flaw, so I tried FCITX, use is very good, and can be used in Java programs, but in this case the cursor following some problems, the input interface will stay at the bottom of the screen, but can be accepted, compared to the ibus cannot be used much better.
Install FCITX:
sudo apt-get install FCITX
Start FCITX:
Log off and login again, FCITX will take effect. If you need to switch back to IBUs, you can run Im-switch-s IBUs, and then log off and log back in. FCITX can also go through Ctrl + Empty style, you will find FCITX display in Chinese is a box, so you need to modify the FCITX configuration. The FCITX configuration file is ~/.fcitx/config, the file is GBK encoded, and is not displayed properly under Ubuntu, and can be operated as follows:
CD ~/.fcitx
iconv-f gbk-t UTF8 config > config.tmp
Edit Config.tmp File:
Display Font (medium) =wenquanyi Micro Hei
Display Font size =10
Use bold =0
Save the exit, and then run the command:
Iconv-f utf8-t gbk config.tmp > Config
Log in again after logging off, FCITX display normal.
For Sogou input candidate character garbled problem, run first
sudo apt-get install Fcitx-module-kimpanel
And then log off or reboot, which is generally OK.
What's the difference between UTF8 and UTF-8?
"UTF-8" is the standard writing, in the English language is not case-sensitive, so you can write "Utf-8". "UTF-8" can also be the middle of "-" omitted, written "UTF8." General procedures can be identified, but there are exceptions (below), in order to be strict, it is best to use the standard uppercase "UTF-8". Only "Utf-8" Alias "UTF8" can be used in MySQL, but uppercase "UTF-8" is used everywhere else.
The solution of the Chinese display as a box in Flash on the Web page
Edit the/etc/fonts/conf.d/49-sansserif.conf file and make the following modifications:
<edit name= "Family" mode= "Append_last" > <string>wenquanyi Micro hei</string>, </edit
>
Java program part of the Chinese display as a box solution
Create the fallback directory under the $java_home/jre/lib/fonts directory, copy (or link) The Chinese font file to the fallback directory.
sudo mkdir $JAVA _home/jre/lib/fonts/fallback
sudo ln/usr/share/fonts/truetype/wqy/wqy-microhei.ttc $JAVA _home/ jre/lib/fonts/fallback/
"GBK garbled", reference
Garbled look similar:
What do you do? Üòá?? À3?£??? 1,°2à?? Üòá?? À3?£??? 1
Workaround:
Convmv-r-F utf8-t iso88591--notest--nosmart * && convmv-r-F gbk-t-UTF8--notest--nosmart * # to copy the garbled file name file in a Empty directory to run (this is not afraid of the wrong):
"ASCII garbled" reference
Garbled look similar:
%e5%8c%bb%e4%bf%9d
Workaround:
1. Use UNI2ASCII code: Echo Garbled Original | Ascii2uni-a J
2. Install nautilus-filename-repairer0.06 (official source code, but rely on the problem, I have not installed successfully, and the 0.05 version and now Nautilus a little cooperation obstacle, can only see can not be renamed)
3. Download with chromeplus-1.3.3.1 (because this kind of garbled mainly in FF (default UTF8) download QQ Group of files after the production, with Chromeplus (default GBK) under the No problem)
In addition, as for the contents of the file garbled problem can search eNCA.
Solve Rhythmox garbled problem:
Install Rhythmox:sudo apt-get Install Rhythmbox
Install Mid3iconv:sudo apt-get Install Python-mutagen
Mid3iconv-h
Clementine garbled problem
Install Mid3iconv:sudo apt-get Install Python-mutagen
Mid3iconv-h
Clementine does not support UTF8, need it all mp3 songs converted to GBK format, WMA seems to need not to turn on the
Mid3iconv-e GBK *.mp3 (because you cannot bring the-R parameter, you must enter each folder sequentially)
In addition Clementine adopt GStreamer as back end, need to install GStreamer plug-in:
If you want to support MP3, you need to install Gstreamer-0.10-plugins-bad and gstreamer-0.10-plugins-ugly
If you want to support WMA, you need to install Gstreamer-0.10-ffmpeg
If you want to support MMS streaming media, you need to install GStreamer plugins for MMS
In addition Clementine is based on Amarok, so support Amarok plug-ins are generally supported Clementine, such as Osdlyrics.
Convert File content encoding:
File-i <file name> Detection file encoding
iconv--help
Convert File name encoding
sudo apt-get install convmv
convmv--help
convmv-f gbk-t utf8-r--notest files
convmv-r-F utf8-t iso8859 1 *--notest--nosmart && convmv-r-F gbk-t UTF8 *--notest--nosmart
Solve gedit garbled problem:
Gsettings set org.gnome.gedit.preferences.encodings auto-detected "[' GB18030 ', ' GB2312 ', ' GBK ', ' UTF-8 ', ' BIG5 ', '"] Current ', ' UTF-16 ']
Gsettings set org.gnome.gedit.preferences.encodings shown-in-menu "[' GB18030 ', ' GB2312 ', ' GBK ', ' UTF-8 ', ' BIG5 ', '"] Current ', ' UTF-16 ']
Solve PDF Chinese garbled:
sudo apt-get install Poppler-data
Solve the RAR file garbled
Using RAR
Extract zip file garbled
Recently encountered this problem, online search a lap, are what unzip-o, a bit of no use, these buddies are estimated to be directly copied, with no use. Then found a final method, with the Python script to decompress, tried, and really works!!! Here's the code for the Python script, create a new file jieya.py, and write the following code:
#!/usr/bin/env python
#-*-coding:utf-8-*-
import os
import sys
import zipfile
print ' processing File "+ sys.argv[1]
file=zipfile. ZipFile (Sys.argv[1], "R");
For name in File.namelist ():
utf8name=name.decode (' GBK ')
print "extracting" + utf8name
pathname = Os.path.dirname (utf8name)
if not os.path.exists (pathname) and pathname!= "":
os.makedirs (pathname)
data = File.read (name)
if not os.path.exists (utf8name):
fo = open (Utf8name, "w")
fo.write (data)
Fo.close
File.close ()
Then the zip file is placed in the same level directory as jieya.py, running the command Python jieya.py file.zip, Oh!
SMPlayer Chinese Subtitles garbled solution method
Open Options-"preferred" Now: Select the Marquee tab.
Locate the default character encoding option, and in the Drop-down box, select Simplified Chinese (cp936)
Then open the Font page card (top), select System font in the Drop-down selection box to select a simplified Chinese font, such as WEU Quanyi Zen Hei.
VLC player display filename garbled
Change a font that supports Chinese in primary
The above is a small set to introduce the Linux under the garbled Problem solution summary, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!