Re: Unicode versus Utf8
Re: Unicode versus Utf8
- Subject: Re: Unicode versus Utf8
- From: Matt Neuburg <email@hidden>
- Date: Sat, 04 Jul 2009 15:00:37 -0700
- Thread-topic: Unicode versus Utf8
On Sat, 4 Jul 2009 19:32:38 +0200, Yvan KOENIG <email@hidden> said:
>Hello
>
>Is there a way to get, with a script, the Utf8 code of a given
>Unicode character ?
>
>Example:
>
>Unicode: 2019
>Utf8: E28099
>
>Both of them are used in the Index.xml files describing the contents
>of Pages documents.
>So, it's difficult to identifie the bookmark to which an internal
>link is pointing to.
>
>The Bookmark descriptor uses Unicode number: (’)
><sf:p sf:style="paragraph-style-32">
> <sf:bookmark sf:name="Pages ’06" sf:ranged="true"
>sf:page="5">Pages ’06</sf:bookmark>
> <sf:br/>
> </sf:p>
>
>The link descriptor uses Utf8 code. (’)
>
><sf:p sf:style="paragraph-style-32"> <sf:link href="#Pages â€%
>9906"><sf:span sf:style="SFWPCharacterStyle-7">a link</sf:span></
>sf:link><sf:insertion-point/><sf:br/></sf:p>
You've misrepresented the problem. There isn't any conversion between
numbers going on here; you just want to know an equivalence between two
string representations, one that uses XML entities and the other that uses
URL-escaping. The freeware scriptable application UnicodeChecker knows all
about those:
tell application "UnicodeChecker"
get escaped representation of (deXHTMLized representation of "’")
-- "’"
end tell
m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings
_______________________________________________
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