• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Corce alias with Unicode (Japanese) to string fails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Corce alias with Unicode (Japanese) to string fails


  • Subject: Re: Corce alias with Unicode (Japanese) to string fails
  • From: Takaaki Naganoya <email@hidden>
  • Date: Wed, 13 Oct 2004 18:34:51 +0900

I am a Japanese.

On 04.10.12 11:12 PM, "Christian Vick" <email@hidden> wrote:

> I have a list of alia, some contain Unicode (Japanese) characters. When I
> try to coerce them to a Unicode string I get:
>
> Can't make alias "Mac HD:Desktop: fv desktop a´e´u´o´´n@o¨ ??且丗三.txt" into a
> Unicode text.
> -1700

It doesn't look like Japanese :-) .


We prepare Japanese file name very carefully.

Finder returns file names in Unicode.
But the way of Finder to encode text in Unicode is different.

So, we have not to cast the file name wich was returned from Finder.

I'll show the example...

----Wrong pattern in converting Japanese file name as Unicode
tell application "Finder"
    set a to choose file---choose file "AppleScriptでカレンダー表示"(19
characters)
    set b to name of a
    set c to b as Unicode text
end tell

set d to count every character of b

--> 21 (Wrong)

-----------------------------------------------------------


----Right pattern in converting Japanese file name as Unicode
tell application "Finder"
    set a to choose file---choose file "AppleScriptでカレンダー表示"(19
characters)
    set b to name of a
end tell

set b1 to b as string--this operation is very important
set b2 to b1 as Unicode text

set c to count every character of b2

--> 19 (Right)

-----------------------------------------------------------


Unicode has several format in encoding. Finder's encoding format is
different from encoding format of AppleScript.

This is very important matter to parepare file names written in Japanese.
Apple must write this in on-line manual.

Many Japanese beginners think "AppleScript on Mac OS X can't prepare
Japanese".

It is miserable situation....


--
Takaaki Naganoya
email@hidden


 _______________________________________________
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

  • Follow-Ups:
    • Need help: Really silly Excel 2004 question
      • From: Richard Rönnbäck <email@hidden>
References: 
 >Corce alias with Unicode (Japanese) to string fails (From: Christian Vick <email@hidden>)

  • Prev by Date: Re: String to sum
  • Next by Date: Need help: Really silly Excel 2004 question
  • Previous by thread: Re: Corce alias with Unicode (Japanese) to string fails
  • Next by thread: Need help: Really silly Excel 2004 question
  • Index(es):
    • Date
    • Thread