-   Linux - Software (
-   -   problem with some Chinese characters (

shockers_jm 03-10-2005 05:18 PM

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?)

All times are GMT -5. The time now is 08:41 AM.