Programmer's Guide > Programming and Scripting Techniques > Basic Document Manipulation Using the DOM and AOM > Inserting Text > Inserting Text Containing a Non-Latin Character
  
Inserting Text Containing a Non-Latin Character
To insert a string containing characters such as letters from non-English alphabets, include the Unicode character in the text string. Do not include it as an entity reference.
For example, suppose you are authoring a travel guide and wish to append a paragraph that includes the German word Gemütlichkeit. If you include the ü as an entity reference, the entity will not be resolved. For example:
var newText1 = doc.createTextNode("Austrians are known for their Gemütlichkeit");
The text node will literally contain “Gemütlichkeit”. Instead, insert the character as in the following example:
var doc = Application.activeDocument;
var paras = doc.getElementsByTagName("para");
var newText = doc.createTextNode(" Austrians are known for their Gemütlichkeit");
paras.item(0).appendChild(newText);