• 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
NSTextView, unicode, Applescript and Mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView, unicode, Applescript and Mail


  • Subject: NSTextView, unicode, Applescript and Mail
  • From: Nick Morris <email@hidden>
  • Date: Sun, 5 Oct 2003 20:27:49 +0100

Hi,

The problem: Unicode text (Japanese characters) in an NSTextView (theTextView) is passed to Mail via an Applescript in the program....

('theContents' is set first for reasons in other sections of the program)

[theScript setString:[NSString stringWithFormat:@"set theContents to \"%@\"\n", [theTextView string]]];

[theScript appendString:@"tell application \"Mail\"\n"];
[theScript appendString:@"activate\n"];
[theScript appendString:@"set the new_message to make new outgoing message at beginning of every outgoing message\n"];
[theScript appendString:@"tell new_message\n"];
[theScript appendString:@"set the content to theContents\n"];
[theScript appendString:@"end tell\n"];
[theScript appendString:@"make new OLD message editor at beginning of every OLD message editor\n"];
[theScript appendString:@"set outgoing message of last OLD message editor to new_message\n"];
[theScript appendString:@"end tell\n"];

mailScript = [[NSAppleScript alloc] initWithSource:[NSString stringWithString:theScript]];
result = [mailScript executeAndReturnError:&scriptErr];

All works great with text such as 'This is some text' but as soon as I start trying to pass the Japanese characters I get '??' in Mail.

Any thoughts?

Thanks in advance.....

Nick
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSTextView, unicode, Applescript and Mail
      • From: Andrew Thompson <email@hidden>
  • Prev by Date: Re: NSTableView Dragging Issues
  • Next by Date: Software Incompatibilities - Please Help!
  • Previous by thread: Re: NSTableView Dragging Issues
  • Next by thread: Re: NSTextView, unicode, Applescript and Mail
  • Index(es):
    • Date
    • Thread