Re: unicode to ascii (not MacRoman)
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