Revert "Decode utf8 text only for correct format in Literal.getText()"

This reverts commit 83fcbaa633.
This commit is contained in:
Tankred Hase 2016-02-10 15:33:45 +07:00
parent 707b3919e1
commit 000c3b3686

View File

@ -60,7 +60,7 @@ Literal.prototype.setText = function(text) {
*/
Literal.prototype.getText = function() {
// decode UTF8
var text = this.format === 'utf8' ? util.decode_utf8(util.Uint8Array2str(this.data)) : util.Uint8Array2str(this.data);
var text = util.decode_utf8(util.Uint8Array2str(this.data));
// normalize EOL to \n
return text.replace(/\r\n/g, '\n');
};