Support UTF-8 encoding

 for documents that contain Unicode characters
 (previously, they were getting turned into question marks by the
  ASCII encoder)