• 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
Re: Applescript reading unicode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applescript reading unicode


  • Subject: Re: Applescript reading unicode
  • From: Nigel Garvey <email@hidden>
  • Date: Wed, 28 Sep 2011 16:48:13 +0100

David Jacopille wrote on Wed, 28 Sep 2011 11:09:54 -0400:

>I'm having an encoding problem with utf-16 characters read from an
external
>text file, specifically an em dash (U+2014).
>
>Reading text file with this command in Script Debugger 4.5.7.
>
>set data_content to read file path_to_utf16_text_file

  set data_content to (read file path_to_utf16_text_file as Unicode text)

The 'as' here isn't a coercion but a parameter of 'read'. It tells the
command to interpret the data in the file as UTF-16 Unicode text. For
historical reasons, 'read' assumes the UTF-16 in the file is big-endian
unless it begins with a little-endian BOM.


NG

 _______________________________________________
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

  • Prev by Date: Re: What do you think about Apple and Lion? - Just a survey
  • Next by Date: Re: What do you think about Apple and Lion? - Just a survey
  • Previous by thread: Applescript reading unicode
  • Next by thread: AUTO: Jin Ming Tsin is out of the office (returning 2011-10-10)
  • Index(es):
    • Date
    • Thread