Hacker News new | past | comments | ask | show | jobs | submit login

Request, response and streams default to ASCII, e.g. response.write(chunk, encoding='ascii')



That 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])


docs are wrong, it defaults to utf8




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: