• 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: Dealing with Japanese filenames??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dealing with Japanese filenames??


  • Subject: Re: Dealing with Japanese filenames??
  • From: has <email@hidden>
  • Date: Tue, 3 May 2005 10:50:03 +0100

Jonathan del Strother wrote:

>I'm using Applescript to tell iTunes to add some files to a playlist.
>I have the filepaths in Cocoa as UTF8 strings. It handles accented characters fine, but fails for things like Japanese characters, complaining that it "can't make some data into the expected type"
>
>I've tried both executing the script directly (via initWithSource), and writing the script to a file and executing the file (initWithContentsOfURL) - Both report the same error.

Sounds more like a question for the AppleScript Implementors list, but anyway...

AppleScript source code uses MacRoman or equivalent encoding. There's no proper way to specify unicode literals in AS code. That said, code generation isn't such a good way of doing things; instead, write a generic script that takes the file data as parameters to a handler call, then pack your file data into an Apple event as [e.g.] FSRefs and pass this to your NSAppleScript's executeAppleEvent:error: method.

HTH

has
--
http://freespace.virgin.net/hamish.sanderson/
 _______________________________________________
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:
    • Re: Dealing with Japanese filenames??
      • From: Jonathan del Strother <email@hidden>
  • Prev by Date: Re: XML Files
  • Next by Date: Re: Changes to "POSIX" in Tiger?
  • Previous by thread: Re: Dealing with Japanese filenames??
  • Next by thread: Re: Dealing with Japanese filenames??
  • Index(es):
    • Date
    • Thread