Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
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.")
> 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
Jo Klein writes: > Out of curiosity, do the characters also display correctly on X when > grabbed from the Windows character map? I've no idea, but I'm not usually that lucky. :-) Here is another useful link: http://www1.tip.nl/~t876506/charsets.html 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.")
Jo Klein writes: > Out of curiosity, do the characters also display correctly on X when > grabbed from the Windows character map? Here is a test program you can download. This works properly on my machine. I'd be curious how it works in X. http://www.dfanning.com/misc/test_diacritics.pro 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.")
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.")
On my X, the charmap-grabbed version displays correctly, but the !Z notation doesn't work.
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.")
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
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.'
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.")
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.")
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
> 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?
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.")