comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Unicode Question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Unicode Question [message #46887 is a reply to message #46886] Fri, 06 January 2006 13:16 Go to previous message
mitch grunes is currently offline  mitch grunes
Messages: 6
Registered: November 1999
Junior Member
First, you might look at

http://www.unicode.org

to see what unicode codes are.

Don't forget that some people write the ASCII subset in 8 bits, others
include a null byte to make it 16.

Open and read an 8 bit code to the file in the usual way:
a=string(0b) & b=a
openr,1,'yourfilename'
readu,1,a

Then if a is 0, drop it. If not, and it is a legit ASCII char, rather
than one of the Unicode prefixes, as you can determine from its range,
the character is string(a). else
readu,1,b
and the character will be in string
string([a,b])
Of course, that string is two bytes long - which is right for Unicode.

I haven't checked this out, as I don't have a licensed IDL where I am
now, but it should work. I'll let you figure out the prefix codes.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Problem Compiling and Using Functions
Next Topic: reading a ninary file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Dec 02 06:12:00 PST 2025

Total time taken to generate the page: 1.67924 seconds