• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Encoding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Encoding


  • Subject: Encoding
  • From: "koenig.yvan" <email@hidden>
  • Date: Sat, 30 Aug 2014 23:25:59 +0200

Hello

I am supposed to read the text contents of a file.
Most characters are ASCII ones
One of them is stored as $E3. It's ã (aTilde)

I tried : read file theFile and got :
ceic„o


In an other occurrence of the same string  the aTilde is stored as $C3 $E3 which is the utf8 ID
I tried : read file theFile and got :
ceic√£o

Which way may I get the correct string :
ceicão

I tried with
read file theFile  as «class Utf8»
The result is in fact the hexadecimal contents of the file.

I tried with
read file theFile  as «class ut16»
This time the read process is successful but the result is meaningless : I get only eastern characters

I tried with :
read file theFile  as data 
but this time I got
63 65 69 63 C3 A3 6F 20
when the true Hex contents is :
63 65 69 63 C3 E3 6F 20

So, I am puzzled.

Is there an instruction which I forgot which permit to read the correct values ?

Yvan KOENIG (VALLAURIS, France) samedi 30 août 2014 23:22:37



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Encoding
      • From: Shane Stanley <email@hidden>
    • Re: Encoding
      • From: Emmanuel LEVY <email@hidden>
  • Prev by Date: The Future of AppleScript
  • Next by Date: Re: Encoding
  • Previous by thread: Re: The Future of AppleScript
  • Next by thread: Re: Encoding
  • Index(es):
    • Date
    • Thread