Re: print wrong characters [message #52262] |
Wed, 24 January 2007 14:23 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Bob Crawford writes:
>> From the TechTip:
> "IDL Widgets do not have access to any font other than the Operating
> System device fonts, and are coded in such a way that they can only
> create strings of 1-byte ASCII characters. That is, string arguments
> used in IDL widget calls can only map to the first 256 chars in any
> operating system device fontset"
>
> So David's cut'n paste from the Character Map works only because the
> chosen character was in the first 256 characters - but the !Z notation
> does not work because IDL wasn't coded to interpret that notation in
> that case (widgets). Is that what that means?
I'm a little fuzzy about exactly what that means, too.
But that seems to be right. I can paste any character
from the Character Map application into a word and have
it rendered properly as long as it's unicode value is
less than or equal to a decimal value of 255. Higher
than that, I appear to be out of luck.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: print wrong characters [message #52263 is a reply to message #52262] |
Wed, 24 January 2007 14:00  |
Bob[3]
Messages: 60 Registered: December 2006
|
Member |
|
|
> From the TechTip:
"IDL Widgets do not have access to any font other than the Operating
System device fonts, and are coded in such a way that they can only
create strings of 1-byte ASCII characters. That is, string arguments
used in IDL widget calls can only map to the first 256 chars in any
operating system device fontset"
So David's cut'n paste from the Character Map works only because the
chosen character was in the first 256 characters - but the !Z notation
does not work because IDL wasn't coded to interpret that notation in
that case (widgets). Is that what that means?
|
|
|
Re: print wrong characters [message #52264 is a reply to message #52263] |
Wed, 24 January 2007 13:16  |
Karl Schultz
Messages: 341 Registered: October 1999
|
Senior Member |
|
|
On Wed, 24 Jan 2007 08:14:24 -0700, David Fanning wrote:
> Joan writes:
>
>> i want to convert strings because my widgets display wrong characters.
>>
>> for example: i want to write: baleny=E0 (it's a catalonia's town). and
>> IDL writes: balen=FD
>> any ideas=BF?
>>
>> i think that the problem must be UTF convertion or string format
>> displaying..
>
> Karl can probably speak more authoritatively on this topic,
> but I think this is a can of worms. :-)
Actually, a TechTip may explain it better than I could:
http://www.ittvis.com/services/techtip.asp?ttid=3519
Karl
|
|
|
Re: print wrong characters [message #52266 is a reply to message #52264] |
Wed, 24 January 2007 08:42  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Mike writes:
> Ok, I'll bite - is there some reason to expect "!Z(225)" to look like
> anything other than "!Z(255)"?
Well, it would save me from having to locate that
damn character map application on my computer all
the time! :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: print wrong characters [message #52267 is a reply to message #52266] |
Wed, 24 January 2007 08:40  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Bob Crawford writes:
> According to the online help embedded formatting commands do not work
> with hardware fonts.
Yes, but why not? Clearly the thing I am asking for can
be *done* in hardware fonts, since I've managed to do it
another way.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: print wrong characters [message #52268 is a reply to message #52267] |
Wed, 24 January 2007 08:26  |
Bob[3]
Messages: 60 Registered: December 2006
|
Member |
|
|
According to the online help embedded formatting commands do not work
with hardware fonts. Checking if the device is able to utilize those
commands involves seeing if bit 12 of the Flags field of !D System
Variable is set.
i.e.:
IF (!D.FLAGS AND 4096) NE 0 THEN PRINT, 'Bit is set.'
|
|
|
Re: print wrong characters [message #52269 is a reply to message #52268] |
Wed, 24 January 2007 08:17  |
Mike[2]
Messages: 99 Registered: December 2005
|
Member |
|
|
On Jan 24, 10:51 am, David Fanning <n...@dfanning.com> wrote:
> Jo Klein writes:
>> On my X, the charmap-grabbed version displays correctly, but the !Z
>> notation doesn't work.
> Yep, same here.
Ok, I'll bite - is there some reason to expect "!Z(225)" to look like
anything other than "!Z(255)"?
Mike
|
|
|
Re: print wrong characters [message #52270 is a reply to message #52269] |
Wed, 24 January 2007 07:51  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jo Klein writes:
> On my X, the charmap-grabbed version displays correctly, but the !Z
> notation doesn't work.
Yep, same here.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|
Re: print wrong characters [message #52272 is a reply to message #52271] |
Wed, 24 January 2007 07:35  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> This works properly on my machine.
Well, "properly". It illustrates the problem on my
machine. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|
|
Re: print wrong characters [message #52276 is a reply to message #52274] |
Wed, 24 January 2007 07:26  |
Jo Klein
Messages: 54 Registered: January 2006
|
Member |
|
|
> characters for display in a widget. However, if I use the
> unicode characters (an accented a, for example) in a string
> (I probably used the Windows Character Map application to
> grab the right character), then this is *usually* displayed
> properly.
Out of curiosity, do the characters also display correctly on X when
grabbed from the Windows character map?
Thanks,
Jo
|
|
|
Re: print wrong characters [message #52277 is a reply to message #52276] |
Wed, 24 January 2007 07:14  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Joan writes:
> i want to convert strings because my widgets display wrong characters.
>
> for example: i want to write: baleny=E0 (it's a catalonia's town). and
> IDL writes: balen=FD
> any ideas=BF?
>
> i think that the problem must be UTF convertion or string format
> displaying..
Karl can probably speak more authoritatively on this topic,
but I think this is a can of worms. :-)
http://www.cs.tut.fi/~jkorpela/chars.html
I find it impossible to construct a string using unicode
characters for display in a widget. However, if I use the
unicode characters (an accented a, for example) in a string
(I probably used the Windows Character Map application to
grab the right character), then this is *usually* displayed
properly.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|