Hi 9krausec, so if I understand right you're generating a script file for MoI to run in a sort of "headless" fashion, is that correct?
So I think your problem is that although JavaScript can at runtime handle unicode strings, a .js source code file cannot itself be a unicode text file, it is expecting that a .js file containing JavaScript code in it should be ascii encoded.
That means that any unicode text that you want to store as a string literal in a .js source code file will need escaping as you describe.
At runtime it's a different story, a string variable in the javascript runtime environment can contain unicode in it just fine, it should only be string literals inside of a .js ascii text file that need the escaping.
re:
> But I'm hoping there is a blanket application that ships with moi or in javascript that
> will automatically do the leg work for me during the import/export process in moi.
There is no application that ships with MoI that is specifically oriented around generating .js source code files. They are most typically generated by a person typing the code in a text editor. If you are generating the .js files programmatically you would need to incorporate the escaping into your own .js file generating code.
Please let me know if that isn't what you are running into.
- Michael
|