On Sun, Mar 11, 2012 at 22:03, Mark Volkmann <[email protected]> wrote: > The documentation for the ReadStream setEncoding method at > http://nodejs.org/docs/latest/api/stream.html says the encoding can be > 'utf8', 'ascii' or 'base64'. Buffers support these additional > encodings: 'ucs2', 'binary' and 'hex'. In looking through the source, > I don't see where ReadStreams are limited to particular encodings. Do > they really not support all the encodings supported by Buffers?
They do. ReadStream is backed by StringDecoder (a mostly internal class) that optimizes for UTF-8 and passes off everything else to Buffer.toString(encoding). -- 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
