6 ms·
Which part of the API has ASCII as the default encoding? From the v0.2.0 docs it seems like Buffer objects default to utf8.
by grantj 16y ago
Which part of the API has ASCII as the default encoding? From the v0.2.0 docs it seems like Buffer objects default to utf8.
- pornel 16y agoRequest, response and streams default to ASCII, e.g. response.write(chunk, encoding='ascii')
- grantj 16y agoThat should really be in big red text in the docs considering it actually destroys bits. The api also seems inconsistent wrt net.Stream writes are encoded in ASCII but plain writable streams default to utf8: stream.write(string, encoding='utf8', [fd])
- ryah 16y agodocs are wrong, it defaults to utf8