Set the encoding to use for text extraction.
[read/write property] textEncoding([out, retval] BSTR *encodingName) textEncoding([in] BSTR encodingName)
This property sets the encoding to use for text output.

The following encodings are predefined:

Technical note: If you set the encoding to "UCS-2", XpdfViewer will extract Unicode text directly into a COM BSTR object, one Unicode character per BSTR character. All other encodings place one byte per BSTR character.
viewer.textEncoding = "UCS-2"