Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 03-10-2005, 05:18 PM   #1
LQ Newbie
Registered: Mar 2005
Posts: 1

Rep: Reputation: 0
problem with some Chinese characters

I'm stuck in the muck with Chinese fonts. I'm on a Redhat system (Linux 2.4.18-24.7.x) with standard-installed fonts.

Using Perl/Tk or tcl, some Chinese characters are not displayed correctly. I don't think it's RH-only, as I also have the same problem on Solaris. But others have been able to run it with no problem, so it's obviously a font (library?) problem for me. BTW, all of the Chinese characters were correct when running on WinXP.

I've got two short scripts showing the problem. Each displays three lines of Chinese characters. The problems are with the last character in each line. (Problem is not because it's last character on a line, it's just that way in my example).

Running the Perl/Tk script (on ActivePerl 5.8.6) shows squares for the last character of each line:

   use Tk;

   $text  = "\x{4FEE}\x{593E}\x{8173}\n";
   $text .= "\x{66F4}\x{63DB}\x{786C}\x{789F}\n";
   $text .= "\x{66F4}\x{63DB}\x{6DB2}\x{614B}\x{6C2E}\n";

   $top =  new MainWindow;
   $top -> Label (-text => $text) -> pack;
   $top -> Button (-text => "exit", -command => sub { exit }) -> pack;

Running "/bin/wish" on this tcl program produces the wrong character for the last character of the first line (2nd and 3rd lines were correct):

   pack [text .t]

   .t insert end "
Running a different wish on the same box showed squares for the last three characters of each line (like Perl).

Would appreciate an explanation on what the problem is. Do I need to add some other font files? (If so, which ones and how do I install it?) Do I need to call out a specific font inside the scripts? (I'd prefer not to since it's working fine in Windows). Why is it some people don't see the problem at all? (Did they install additional "international" fonts?)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to make Chinese characters display correctly in Gentoo? fossilet Linux - Distributions 4 10-31-2004 09:21 AM
Read chinese problem ust Linux - General 3 09-21-2004 01:09 AM
Read chinese problem ust Linux - General 1 08-16-2004 10:43 AM
the chinese input problem vanbastern Linux - Newbie 3 04-04-2004 06:38 PM
Konqueror does not display Chinese characters correctly whitefox Slackware 3 03-01-2004 09:40 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:17 AM.

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