In short - what is the JavaScript for Mac Automation equivalent of AppleScript\'s as «class utf8»
?
I have a unicode string that I\'m t
JXA can't do symbol types (type and enumerator names) right, and it can't do raw four-char codes at all. Either stick to AppleScript, which is the only officially supported option that speaks Apple events right, or use the Cocoa bridge to write a NSString to file in NSUTF8StringEncoding, c.f. Patrick's solution.