Re: Coercing ligatures to expanded characters
Re: Coercing ligatures to expanded characters
- Subject: Re: Coercing ligatures to expanded characters
- From: Shane Stanley <email@hidden>
- Date: Sat, 14 Jan 2017 10:29:07 +1100
On 14 Jan 2017, at 3:47 am, has <email@hidden> wrote:
Surprising though as it's exactly what ICUs transforms are designed to do.
It does handle the more common of the ligatures the OP listed:
use AppleScript version "2.5" -- requires 10.11 or later use framework "Foundation" use scripting additions
set theString to current application's NSString's stringWithString:"fiffffifflflœᵫstæꜵꜨꜲ" (theString's stringByApplyingTransform:"Latin-ASCII" |reverse|:false) as text --> fiffffifflfloeuestaeꜵꜨꜲ
That's split all but the last three. It may be that the OP listed every ligature he knew, rather than those the "helpful" OCR software is including, and the above may solve his problem (or he can use the equivalent in BridgePlus pre-10.11).
But perhaps of more interest is this:
considering case but ignoring diacriticals "ꜵꜨꜲ" = "aoTzAA" end considering --> true
That raises the question of what AppleScript is using.
|
_______________________________________________
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