google apps script - Handling unknown characters in Blob.setDataFromString with encoding -
i have google add-on export sheet data in defined encoding. common encoding used iso-8859-1. script creates internal string, runs:
utilities.newblob("", null, filename).setdatafromstring(propclob, defencoding);
if original data contains character cannot represented in 'defencoding', resulting blob contain '?'. i'd replace character unicode expression instead, eg. \u0105.
- how can check string characters not present in given encoding?
- how can find unicode expression given utf-8 character?
thanks, simon
Comments
Post a Comment