LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-09-2004, 08:46 PM   #1
crnchyfrog
LQ Newbie
 
Registered: Oct 2004
Location: Shanghai
Distribution: Slackware 10.2
Posts: 25

Rep: Reputation: 15
Chinese Character display firefox/mozilla


Hello, I am new here ..so please have mercy


I am running Fedora Core 2 and using Firefox as my internet browser in the GNOME GUI environment. I cannot seem to get firefox to display chinese characters properly. I am using (Unicode)UTF-8 for charcter encoding, and i have tried switching it to the asian fonts Chinese siplified, GB-5 and all that but no luck.

I ran a search, but i didn't find anything terribily useful. Some had suggested getting new fonts, but the link ran to a site that provided windows fonts, which i do not believe to be too much help.

Someone also suggested changing my local, but i don't know how to do that.

So, any help would be appreciated. The more specific/detailed the better, as i am very much linux n00b.

Thanks,
Dave
 
Old 10-09-2004, 10:35 PM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Dave,

Welcome to LQ!

The browser I can get to display Hanzi consistently is
Konqueror. You'll need to set your language encoding to
GB2312. You'll also need some Chinese fonts installed,
which I didn't get by default with Slackware. I've installed
these fonts from Windoze:
-rwxrwxrwx 1 root root 10044356 2004-08-23 20:44 simhei.ttf*
-rwxrwxrwx 1 root root 10500792 2004-08-23 20:44 simsun.ttc*
-rwxrwxrwx 1 root root 10499104 2004-08-23 20:44 simsun.ttf*
and I think SimSun works best, maybe because it has both
the .ttc and .ttf files.

To set the encoding for your browser to display the fonts:

Here's how in Konqueror-3.2.3:
Settings -> Configure Konqueror -> Fonts -> Default encoding: gb2311

Here's how in Firefox-0.9.3:
Edit -> Preferences -> General -> Languages...
and I add Chinese/China [zh-cn]
Chinese [zh]
Default Charcter Encoding: Chinese Simplified (GB2312)

however, Firefox still doesn't display Hanzi correctly for me...

You might also want to search LQ for posts by JDW because
he says he has been able to get it to work...
 
Old 10-10-2004, 10:20 AM   #3
crnchyfrog
LQ Newbie
 
Registered: Oct 2004
Location: Shanghai
Distribution: Slackware 10.2
Posts: 25

Original Poster
Rep: Reputation: 15
Thanks for the welcome and the quick reply.


I will try it out when i get to work tomorrow. I also noticed that at the login screen there is a language selection bar that allows me to select which language I want to use for the session. In the selection window all of the asian fonts just come outt as the unicode box w/ the 4 numbers at the corners. Where as the other languages seem to display properly. So it seems that it's not just a browser problem but system wide.

I noticed that your font installation permissions were for \root which should allow a system wide change correct? does this mean that I will be able to use the fonts in other applications other than my web browser?



Thanks,

Dave
 
Old 10-10-2004, 06:05 PM   #4
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Quote:
Originally posted by crnchyfrog
Thanks for the welcome and the quick reply.


I will try it out when i get to work tomorrow. I also noticed that at the login screen there is a language selection bar that allows me to select which language I want to use for the session. In the selection window all of the asian fonts just come outt as the unicode box w/ the 4 numbers at the corners. Where as the other languages seem to display properly. So it seems that it's not just a browser problem but system wide.
I run Slackware in init level 3 which is a text login. From there I issue "startx"
to load the X server. You're probably using X11 with KDM/GDM/XDM
(session managers), which is something I'm not familiar with. It seems that may
be for the system language, meaning everything you see - menus, etc. It also
sounds to me like you don't have any Chinese fonts installed. If you use KDE,
you can check and/or install fonts via
Control Center -> System Administration -> Font Installer
If you're running a dual boot system, you can browse to the path in your Windoze
installation where you have the fonts installed. Well, it's in your C:\ somewhere
directory, so that may or may not be applicable to your system.

Quote:
I noticed that your font installation permissions were for \root which should allow a system wide change correct? does this mean that I will be able to use the fonts in other applications other than my web browser?



Thanks,

Dave
That's how KDE installed them, per the above instructions. I've done it
differently in the past. You can display Hanzi in other applications, such
as KWord and OpenOffice. The problem is that you need a Input Method
Editor to input Chinese characters, and that's where I've had my
problems. At the moment, that's not the highest priority on my To-Do
List, which is why I suggested you read those posts by JDW.

I know about scim and fcitx (IMEs) for Linux. I've tried fcitx, which iirc is
designed to be used with KDE. The one time I tried it, I was running my
preferred window manager, Fluxbox, and the installation of fcitx totally
hosed Fluxbox. It may have been the instructions that I followed, but the
results were not acceptable, and I've yet to try again.

To be quite honest, I can only help you so far - and I'm hoping that you
will have some good news after you get your fonts installed about the
Input Method Editor installation.

I don't seem to have trouble viewing Chinese fonts on websites now with
Firefox, but I do have trouble with some of the posts here in LQ where
someone else has entered Hanzi. Can you post a link to a website where
you should expect to see Hanzi, but you see garbled characters instead?

I build and repair computers, and my friend works for this company, where
I buy all my parts. Let me know how it displays for you. It's fine here ->
http://www.wenhao.com.cn/
 
Old 10-10-2004, 09:52 PM   #5
crnchyfrog
LQ Newbie
 
Registered: Oct 2004
Location: Shanghai
Distribution: Slackware 10.2
Posts: 25

Original Poster
Rep: Reputation: 15
KICK ASS!

I got it to work. It now displays properly in Konquerer, Firefox, and Mozilla.

Here's what I did.

I pretty much followed the instructions on this webpage to the "T". http://corefonts.sourceforge.net/

However, after installing those fonts, it still wouldn't display properly. I tried to copy the fonts from usr/share/fonts/msttcorefonts/ to fonts:/// directory but it was no dice. It wouldn't let me copy the files.

I then logged in as /root and copied the files, but it still didn't seem to work. That file doesn't seem to carry the simsun.tff font. I searched the net and found a file ~8.4 mb that was simsun.tff from http://transbeijing.com/data/simsun.ttf

I then copied that file into the fonts:/// directory when logged in as /root. Then i changed the font used by applications in prefrences to simsun. I then changed the encoding to "Chinese Simplified - GB2312" Reloaded Konquerer and it worked. I did the same for firefox as well.

I switched back to my /user account an everything works fine now. However, when I go to prefences -> fonts -> it still says sans under application font, but it still displayes properly.

My test page was www.163.com your website http://www.wenhao.com.cn/ works as well.


I'm not sure which one of the steps actually got it to work. The simplest way to check would be to d/l the simsun.ttf file and put it in the fonts:/// directory under root and see if that works.

Thanks for all the help,

Dave


edit: That was truly a pain in the ass.


Last edited by crnchyfrog; 10-10-2004 at 09:56 PM.
 
Old 10-10-2004, 10:15 PM   #6
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Dave,

I just checked your account at 163.com - you owe a bunch!!

Ha-ha!

There's one other thing I've done in Firefox.
Edit -> Preferences -> General -> Fonts and Colors ->
Fonts for: Simplified Chinese

Proportional : Sans Serif (can only be Serif or Sans-Serif)
Serif: SimSun
Sans serif: SimSun
Monospace: SimSun

I didn't load any fonts as root, always as user. I don't setup anything
like my browser as root. All I ever do as root is system maintainence.

I have no trouble displaying Chinese on a Chinese website, just in a
particular thread in LQ where some guys posted Chinese. That would
only display in Konqueror. Since that's not where or why I want to read
Chinese - mei you guanxi!

Now, when you can do Chinese input, post back or email and let me
know how you got THAT working, okay?
 
Old 10-10-2004, 10:30 PM   #7
daihard
Member
 
Registered: Jul 2003
Location: Seattle, WA
Distribution: Kubuntu 14.04 LTS
Posts: 915

Rep: Reputation: 34
Hi.

Did you try asking the question at MozillaZine.org? That's a very useful forum for the Mozilla/Firefox users.

http://forums.mozillazine.org/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can not display bold font in Mozilla firefox can not be displayed! septanla Ubuntu 1 04-24-2005 11:01 AM
unzip seems failing to correctly handle chinese character haodongdong Linux - Software 3 04-23-2005 03:14 AM
chinese character input and display -- need help carboncopy Slackware 5 07-06-2004 08:12 PM
could not display chinese so-fish Linux - Software 8 06-04-2004 06:44 PM
Mozilla can not display Chinese in Slackware9.1 preswang Linux - Software 5 10-16-2003 03:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration