Collection and solution of Ubuntu10.04 Chinese problems

Source: Internet
Author: User
Tags tmp file

1. ibus Input Method
After Ubuntu is installed, the ibus input method is provided, which is disabled by default in the English environment.
To configure automatic Startup of ibus, you can select System --- Preferences --- Startup Applications from the ubuntu System menu, and add a program in this window:
Name: ibus-daemon
Command: ibus-daemon-d-x-r

By default, ibus provides relatively poor Chinese input methods, and requires additional installation of ibus-pinyin. The command is as follows:
Sudo apt-get install ibus-pinyin

In this case, you also need to start the ibus-pinyin input method. On the ubuntu System menu, Select System --- Preferences --- IBus Preferences. In the Select an Input Method drop-down box on the input method page, Select add Chinese-Pinyin, it is the one with a large "spelling" in the icon, click the Add button, and then use the Up button to move the Input Method to the top.

After the system is restarted, press Ctrl + space to call up the ibus input method.

The ibus input method is good in general, but it cannot be called in some Java programs in my environment, such as Netbeans and OpenProj.

2. fcitx Input Method
Due to ibus defects, I tried fcitx, which is also very good and can be used normally in Java programs, but in this case, the cursor follows some problems, the input interface will stay at the bottom of the screen, but it is acceptable, which is much better than ibus.

Install fcitx:
Sudo apt-get install fcitx

Start fcitx:
Im-switch-s fcitx

Log out and log on again. fcitx will take effect.
To switch back to ibus, run im-switch-s ibus, log out, and log on again.

Fcitx can also be called by pressing Ctrl + space. In this case, fcitx displays a box in Chinese. Therefore, you need to modify the configuration of fcitx. The configuration file of Fcitx is in ~ /. Fcitx/config. The file is GBK encoded and cannot be displayed normally in Ubuntu. You can perform the following operations:
Cd ~ /. Fcitx
Iconv-f gbk-t utf8 config> config. tmp

Edit the config. tmp file:
Show font (medium) = WenQuanYi Micro Hei

Show font size = 10

Use bold = 0

Save and exit, and then run the command:
Iconv-f utf8-t gbk config. tmp> config

Log out and log on again. fcitx is normal.

3. Solutions to box display of Chinese Characters in Flash on the webpage
Modify the/etc/fonts/conf. d/49-sansserif.conf file as follows:
<Edit name = "family" mode = "append_last">

<String> WenQuanYi Micro Hei </string>

</Edit>

4. Solutions for displaying Chinese characters in the Java program as boxes
Create the fallback directory under the $ JAVA_HOME/jre/lib/fonts directory and copy (or link) the Chinese font files 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/

5. Convert File Content Encoding
The plain text file generated in Windows is encoded as GBK in Chinese and garbled In Ubuntu. You can use the iconv command to convert it:
Iconv-f gbk-t utf8 source_file> target_file

6. convert file name Encoding
For zip files compressed in Windows, Chinese file names are garbled during unzipping In Ubuntu. You can use convmv to solve this problem.
Install convmv:
Sudo apt-get install convmv

Conversion file or directory:
Convmv-f gbk-t utf8-r -- notest *

7. decompress the zip file with garbled characters
If you use unzip in Ubuntu to decompress the zip file generated in the Widnows environment, the file name or directory name may be garbled. The solution is to use 7-zip and convmv.

Install 7-zip and convmv:
Sudo apt-get install convmv p7zip-full.

Decompress the zip file:
LANG = C 7z e zip_file
Convmv-f gbk-t utf8-r -- notest *

8. decompress the rarfile with garbled characters.
Decompress the rarfile generated in Windows in ubuntu, and also encounter Chinese garbled characters, such as using 7z to decompress the file.
The solution is to use unrar to decompress the package.
Install unrar:
Sudo apt-get install unrar

9. garbled Chinese Characters in PDF
If the Chinese characters in the PDF file are garbled, you can install poppler-data to solve the problem:
Sudo apt-get install poppler-data

10. font installation
1) install Microsoft Fonts
Sudo aptitude install msttcorefonts

2) manually install other Fonts
Create a font directory under the/usr/share/fonts directory, for example,/usr/share/fonts/myfonts, and copy or LINK the font file to the directory.

Cd/usr/share/fonts/myfonts/
Sudo mkfontscale
Sudo mkfontdir

* The result is normal without executing the following command:
Sudo fc-cache-f-v

11. default font configuration
Sudo cp/etc/fonts/conf. avail/69-language-selector-zh-cn.conf/etc/fonts/conf. d
Sudo vi/etc/fonts/conf. d/69-language-selector-zh-cn.conf

12. Questions about the Evolution Chinese attachment
If you find that the name of an attachment sent by Evolution contains Chinese characters, you can use Evolution for normal resolution, but the attachment cannot be correctly parsed after receiving it using Foxmail or Outlook. Solution:
Select Edit --- Preferences --- Composer Preferences from the evolution menu, and select Encode file names in an Outlook/GMail way from Default Behavior.

From: http://blog.sina.com.cn/s/blog_54b75b230100i6vj.html

Http://apps.hi.baidu.com/share/detail/5783268

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.