I am trying to update a text frame with following script. It works well for all ascii but if chinese characters are entered in text, it displays them as square. I have language pack installed on Indesign machine.
var myDocument = app.open(File('//192.168.1.189/Clients/44/ArtBuild/Artworks/60951.indd'));
var myTextFrame = objPage.textFrames.itemByID(tmp_frmid);
var paragraph1 = myTextFrame.paragraphs.item(0);
paragraph1.contents = "Hello ャンペー"
//-----script ends ----
This updates indd file to display
What can be done so that unicode displays as it is.
Use a Chinese font?
Chinese fonts are already available on Indesign Machine.
Another related query regarding special charcters is:
If the above file doesn't have chinese characters but some special characters, then
1. if I copy the script and execute it in ExtendTool script, it properly updates the indd with special characters specified
2. If I call IndesignServer webservice by passing path of same script file, it updates indd file with junk characters.
Wonder, what difference it makes when script is executed through indesign webservice and not ExtendToolscript
Chances are, it's an encoding issue. Try using Unicode notation instead of the literal characters.