Chinese characters? [message #29372] |
Mon, 18 February 2002 18:18  |
Kristine Hensel
Messages: 26 Registered: June 1999
|
Junior Member |
|
|
Hi,
I need to be able to display Chinese characters. Does anyone have any
experience with or suggestions about how to incorporate Chinese or other
international character sets into IDL?
Hopelessly unifontual,
Kristine
--
Kristine Hensel e-mail: kristine@esands.com
Environmental Systems & Services phone: +61-(0)3-9835-7901
20 Council St., Level 3 fax: +61-(0)3-9835-7900
Hawthorn East, VIC, Australia 3124
|
|
|
Re: Chinese characters? [message #29446 is a reply to message #29372] |
Wed, 20 February 2002 11:29  |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
OK, one more correction, this one is good.
I just discovered that the font 'Arial Unicode MS' should work if you are on
a PC with Office 2000 (or presumably later versions)! And this makes it work
with the other characters that failed for me before. So maybe it was a
problem with my other font, after all.
=====
if !d.window eq -1 then window
!p.font=1
device,/tt_font,set_font='Arial Unicode MS' ; A Chinese TrueType font
erase
xyouts,/norm,0,.5,charsize=4,'!Z(4E00,4E02,4E10)'
xyouts,/norm,0,.4,charsize=4,'!Z(5510,601D,541B)'
end
=====
Cheers,
--
-Dick
Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
|
|
|
Re: Chinese characters? [message #29448 is a reply to message #29372] |
Wed, 20 February 2002 11:01  |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
Hi again,
Sorry the word-wrap got me on line 3... this is more like it:
=====
if !d.window eq -1 then window
!p.font=1
device,/tt_font,set_font='MS Song' ; Must be installed Chinese TrueType font
erase
xyouts,/norm,0,.5,charsize=4,'!Z(4E00,4E02,4E10)' ; These work fine for me
;xyouts,/norm,0,.5,charsize=4,'!Z(5510,601D,541B)' ; These fail on my system
end
=====
Cheers,
--
-Dick
Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
|
|
|
Re: Chinese characters? [message #29449 is a reply to message #29372] |
Wed, 20 February 2002 10:57  |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
"Kristine Hensel" <kristine@esands.com> wrote in message
news:3C71B609.610F7E8F@esands.com...
> Hi,
>
> I need to be able to display Chinese characters. Does anyone have any
> experience with or suggestions about how to incorporate Chinese or other
> international character sets into IDL?
>
> Hopelessly unifontual,
> Kristine
Hi,
I have a great curiosity about this (for more, see
http://www.d-jackson.com/family), so I gave it a little try. If you have a
Chinese TrueType font installed, this may work. I hope it works even better
for you than for me.
=====
if !d.window eq -1 then window
!p.font=1
device,/tt_font,set_font='MS Song' ; Must be an installed Chinese TrueType
font
erase
xyouts,/norm,0,.5,charsize=4,'!Z(4E00,4E02,4E10)' ; These work fine for me
;xyouts,/norm,0,.5,charsize=4,'!Z(5510,601D,541B)' ; These fail on my system
end
=====
As it is here, this puts up a plot window and draws three very nice
characters whose meanings I don't know. :-) I don't know why many or most
characters I tried fail, but they cause an immediate crash of IDL. In other
Unicode applications I can see the other characters perfectly, so my font is
OK. For details on Unicode values for Chinese characters see this large PDF:
http://www.unicode.org/charts/PDF/U4E00.pdf
For RSI tech support, here's my system info:
IDL> print,!version
{ x86 Win32 Windows Microsoft Windows 5.5 Aug 28 2001 32 64}
Kristine, I hope this helps you.
RSI, I hope you can help me! :-)
Cheers,
--
-Dick
Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
|
|
|