This question is not about buffers. It's about strings. If official API says, that handler can operate with strings, i expect, those strings are always valid.
среда, 17 октября 2012 г., 23:49:59 UTC+4 пользователь mscdex написал: > > On Oct 17, 3:35 pm, Vitaly Puzrin <[email protected]> wrote: > > But that can cause broken 2-bytes unicode chars. Calling setEncoding() > does > > not helps. > > IMHO, that's not correct - if function returns string, that string > should > > be valid. > > Why not use Buffers directly and either create a single buffer the > size of Content-Length (if defined) or store incoming Buffers into an > array and Buffer.concat() them together at the end? Then you can > convert to a string afterwards if you need to. > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
