• 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: Universal Binary - AppleScript utxt problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Universal Binary - AppleScript utxt problem


  • Subject: Re: Universal Binary - AppleScript utxt problem
  • From: Jerry Brace <email@hidden>
  • Date: Thu, 26 Jan 2006 00:33:56 -0330

How would I prefix with an appropriate BOM? I read about that but I'm not sure how.

Many thanks,
Jerry

On 26-Jan-06, at 12:32 AM, Ricky Sharp wrote:


On Jan 25, 2006, at 9:05 PM, Jerry Brace wrote:

I am one step away from making my application Universal. Here is my problem. One of the functions of the app communicates to iTunes via AppleScript to tell it to play a particular playlist.
I have been converting the name of the playlist to AppleScript data to solve any non-Roman character problems when referencing the name in the AppleScript.


For example to play the "Library" playlist in iTunes:

tell application "iTunes"
	play playlist «data utxt004C006900620072006100720079»
end tell

instead of:
tell application "iTunes"
	play playlist "Library"
end tell

Just a guess here, but utxt might be assuming a particular endianess (BigEndian?). What happens if you prefix the data block with an appropriate BOM?



Hmm... there's definitely also problems with Script Editor and Unicode.


I just created a folder on my desktop with some Hiragana characters. Using Script Editor, I created a new script document and hit the Record button. I switched to Finder, selected my folder and opened it (Command-O). Switched back to the editor and hit Stop.

The script document at that point did show the proper unicode in it's window. However, when I hit Run, an error was generated, and the Hiragana character that was displayed properly was now replaced with what may be a reinterpretation of those bytes as MacRoman.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Universal Binary - AppleScript utxt problem
      • From: Annard Brouwer <email@hidden>
References: 
 >Universal Binary - AppleScript utxt problem (From: Jerry Brace <email@hidden>)
 >Re: Universal Binary - AppleScript utxt problem (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Re: Knowing whether a tablet is connected and switching modes
  • Next by Date: Re: Bindings or datasource for a large NSTableView
  • Previous by thread: Re: Universal Binary - AppleScript utxt problem
  • Next by thread: Re: Universal Binary - AppleScript utxt problem
  • Index(es):
    • Date
    • Thread