LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 03-10-2005, 04:18 PM   #1
shockers_jm
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:

Code:
   #!/usr/bin/perl
   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;

   MainLoop;
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):

Code:
   pack [text .t]

   .t insert end "
   \u4FEE\u593E\u8173
   \u66F4\u63DB\u786C\u789F
   \u66F4\u63DB\u6DB2\u614B\u6C2E"
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?)
 
  


Reply


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 08:21 AM
Read chinese problem ust Linux - General 3 09-21-2004 12:09 AM
Read chinese problem ust Linux - General 1 08-16-2004 09:43 AM
the chinese input problem vanbastern Linux - Newbie 3 04-04-2004 05:38 PM
Konqueror does not display Chinese characters correctly whitefox Slackware 3 03-01-2004 08:40 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration