Re: Roman Numbers
Re: Roman Numbers
- Subject: Re: Roman Numbers
- From: Takaaki Naganoya <email@hidden>
- Date: Tue, 23 May 2006 10:50:25 +0900
- Thread-topic: Roman Numbers
On 06.5.22 6:56 PM, "Emmanuel" <email@hidden> wrote:
> At 4:53 PM +0900 5/22/06, Takaaki Naganoya wrote:
>>
>> Roman number characters in AppleScript seems wrong.
>>
>> <sample>
>> set aText to "XIXIIXIIIabc" as Unicode text
>
> XI is a Unicode character (x216A)
> XII is a Unicode character (x216B)
> But I can't find a "XIII".
>
> I think that you cannot generate such high Unicode by coercing a
> Roman ASCII string into Unicode. You have to use Unicode in the first
> place.
Yes. I searched the character "XIII" in character palette in vain.
The character "XIII" does not have code point on Unicode.
But...it turns into one character if I cast them into string.
Finder hold characters as Unicode. But encoding method is different from one
in AppleScript (not composed).
So, we have to cast file names into string (as string) and then cast into
Unicode text.
<script>
Set aFile to choose file --chose some file whose file name is including
roman numbers
Tell application "Finder"
set aName to name of aFile
End tell
Set sName to aName as string
Set uName to sName as Unicode text
</script>
We handle Japanese file names in such a way. Almost of files are OK in this
method.
But if roman numbers are included, this method does not work well.
> If you think you would use some help about Unicode, you may like to visit:
> <http://www.satimage-software.com/en/unicode_and_applescript.html>
I read the article first. It is nice :-)
--
Takaaki Naganoya
Piyomaru Software
http://www.appleco.jp/piyomarusoft/
_______________________________________________
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