Paul, I am not clear on what you actually did to make it work. Are you certain you had Entourage registered for English when you tested? Dan, you are correct that I am using literal strings.
Now I recall what I did. I first entered Japanese into some contact fields for a contact in Entourage. It worked fine even though my Entourage is registered is US English. Then I used AppleScript to set a variable to each of those fields 'as Unicode text'. Then I wrote the variable to a text file (not necessary to say 'as Unicode text' - in fact I think that mucked it up), using 'open for access with write permission'. Later I read from that text file 'as Unicode text' (absolutely necessary) setting a variable to 'read' it. Then I set a new contact field in a different Entourage identity to that variable (again no need to say 'as Unicode text') and it appeared as proper Japanese. That identity too was in Entourage registered as US English.
I too found that trying to write Japanese literals in a script editor turned it to mojibake when compiling. i asked one of the AppleScript engineers how he ever codes in Unicode. I'll look up his answer, but I think he said he uses Project Builder, which is Unicode-enabled. I'll go check.
Today AppleScript 1.8.3 was released. Unicode is greatly improved. You can now do AppleScript text item delimiters entirely in Unicode - the delimiters, the text items, the result, everything. Also 'alias' almost works right, aside from accents in disk names - I'll be trying to find a workaround. if this had come out a few weeks ago, I would have dome Export-Import in Unicode. Now it will be a huge effort to convert it. I won't do it just yet, but I'll put out a 1.5 release later on. It will be a lot of work and will probably introduce 1000 bugs...
--
Paul Berkowitz
