setEncoding is not defined on browsers