• 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
Producing Unicode-only characters [was: Finding \t, \r, \n reliably]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Producing Unicode-only characters [was: Finding \t, \r, \n reliably]


  • Subject: Producing Unicode-only characters [was: Finding \t, \r, \n reliably]
  • From: kai <email@hidden>
  • Date: Tue, 25 Oct 2005 01:42:14 +0100


On 24 Oct 2005, at 17:42, Christopher Nebel wrote:

There is no official way to convert between Unicode code points and characters in AppleScript, though there are workarounds using the shell or an intermediate file. For example:

set e to do shell script "perl -e 'print \"\\x{3048}\"'" --> hiragana letter e.
do shell script "perl -e 'use utf8; print ord(\"" & e & "\")'" --> 12360

One method that I've been using to produce Unicode-only characters is:

---------------

«data utxt3048» as Unicode text

---------------

While this seems to be substantially faster than using a shell script, I'm just wondering if there's a potential downside...

---
kai


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Producing Unicode-only characters [was: Finding \t, \r, \n reliably]
      • From: Emmanuel <email@hidden>
References: 
 >Re: Finding \t, \r, \n reliably (From: Shane Stanley <email@hidden>)
 >Re: Finding \t, \r, \n reliably (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: Days and hours
  • Next by Date: Re: Just returning Filename... not whole path
  • Previous by thread: Re: Finding \t, \r, \n reliably
  • Next by thread: Re: Producing Unicode-only characters [was: Finding \t, \r, \n reliably]
  • Index(es):
    • Date
    • Thread