Re: 'sort' command-alternative?
Re: 'sort' command-alternative?
- Subject: Re: 'sort' command-alternative?
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 06 Oct 2002 11:19:41 -0700
On 10/6/02 10:29 AM, I wrote:
>
> set pair to read file f
>
--> "a" [as plain text, new method]
Nope. There are actually 4 characters there:
set pair to read file f
set cc to count pair
--> 4
set {c1, c2, c3, c4} to pair's {character 1, character 2, character 3,
character 4}
--> {"", "", "", "a"}
With HIRIGANA LETTER A - Unicode 3042 according to the character palette, s
is "0B" [as Unicode text] , pair is "0B" and
{c1, c2, c3, c4} = {"", "0", "", "B"}
--Is this 4-byte Unicode-16?
set c1 to (character 2 of pair)
--> "0"
set n1 to ASCII number c1
--> 48
set c2 to (character 4 of pair)
--> "B"
set n2 to (ASCII number c2)
--> 66
set n to (256 * n1) + n2
--> 12354 -- what was that 3042 according to Character pallette?
set htmlChar to "&#" & n & ";"
--> "あ"
display dialog htmlChar
--
open for access file f2 with write permission
write "<html>" & htmlChar to file f2
close access file f2
tell application "Finder" to open file f2
--> correct character in Hiragana Minchu Pro W3 in new TextEdit doc
So this method seem to create a quartet, not a pair, of which the 2nd and
4th characters are the necessary pair, a Unicode number that's correct but
different than wat Characetr palette is giving (is this Unicode 16 vs 8?)
and a predilection for TextEdit or .html documents.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.