3 ms·
I know it's a trade-off, but IMHO it's a very poor one. That's premature optimisation. API is forever. This decision sacrificed easy internationalisation and c
by pornel 16y ago
I know it's a trade-off, but IMHO it's a very poor one.
That's premature optimisation. API is forever. This decision sacrificed easy internationalisation and correctness of data for minor performance benefit in current implementation.
It's a big deal, because node.js isn't merely encoding-ignorant (like PHP), it actually removes higher bits. If you forget to specify encoding somewhere, your text will be malformed.
- saikat 16y agoUTF8 seems to be the default encoding. I think he had just forgotten to update the docs for .write: http://github.com/ry/node/commit/7fc794a8ec55bd9d137c48884043e76e8face916 http://github.com/ry/node/commit/7fc794a8ec55bd9d137c4888404...