• 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: unicode to ascii (not MacRoman)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unicode to ascii (not MacRoman)


  • Subject: Re: unicode to ascii (not MacRoman)
  • From: kai <email@hidden>
  • Date: Sat, 5 Mar 2005 03:18:40 +0000


On Fri, 4 Mar 2005 11:12:05 -0500, "Steven D.Majewski" wrote:

It looks like 'ascii number of character' gives me the MacRoman encoding.
I could probably make a translation table for 'do shell script "tr ..." '
that would wrap MacRoman or Latin-1 to ASCII.

You could even try using such a table in a vanilla script:

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

(* modify string properties as required *)

property uStr : "ÄÅÀÃÂÁÇÉÊËÈÍÎÏÌÑÖÕÓÔÒÜÚÛÙŸáàâäãåçéèêëíìîïñóòôöõøúùûüÿ"
property aStr : "AAAAAACEEEEIIIINOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuy"

to convert(s)
set l to s's characters
repeat with n from 1 to count l
set text item delimiters to l's item n
tell uStr's text items to if (count) > 1 then set l's item n to aStr's item ((count item 1) + 1)
end repeat
set text item delimiters to {""}
l as string
end convert

set origName to "Antônio Carlos Jobim" as Unicode text
set convertedName to convert(origName)

--> "Antonio Carlos Jobim"

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


---
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


  • Prev by Date: Re: question about iPhoto scripting
  • Next by Date: Re: Handler to set Script Properties?
  • Previous by thread: Re: unicode to ascii (not MacRoman)
  • Next by thread: Getting Finder icon view area coordinates
  • Index(es):
    • Date
    • Thread