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

Home » Public Forums » archive » Rename files using IDL - is it possible?
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: Rename files using IDL - is it possible? [message #72072 is a reply to message #72010] Thu, 12 August 2010 14:12 Go to previous messageGo to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
Hi all,

Okay, IDL 7.1.2 and IDL 8.0 fix the original poster's problem, with
testAAA.txt (where A is the A with the ring). Using either
DIALOG_PICKFILE or hard-coded, IDL 8.0 will successfully delete the
file.

Now, regarding Heinz's problem - this is unfortunately a pathological
case, where the 195+133 happens to be the UTF-8 encoding for the
extended ASCII character for 197 (the A with the ring).

Internally, IDL tries to recognize UTF-8 strings by the rules for
UTF-8 encoding. If the first byte is > 193, and the second byte is
between 128-191, then IDL assumes that this is a UTF-8 string. The
file I/O routine then converts the filename to UTF-8 encoding, which
converts the 195+133 to 197, and therefore ends up with the same
filename.

Our UTF-8 conversion routines are based upon the UTF-8 standard, and
are designed to the best of our ability to work with multiple
languages and encodings, including European and Asian languages.
Unfortunately, given a random string of bytes, there is no way to
definitively determine that this is a UTF-8 versus native string.
Hopefully, the case given by Heinz will occur rarely if ever.

Cheers,
Chris
ITTVIS
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: "perspective-ized" axis numbering in iSurface
Next Topic: Re: "Fatal error: IDL has encountered a fatal error and will now exit."

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

Current Time: Wed Oct 08 19:32:19 PDT 2025

Total time taken to generate the page: 0.00281 seconds