I tend to agree with the OP. If node supports strings, they should be valid 
strings. The name setEncoding implies that we plan to respect that 
encoding. Anything else is surprising. I think we're all sympathetic to the 
perf arguments. But that's something that can be worked on. I'd like to see 
this fixed. Maybe turn string_decoder on by default with an option to turn 
it off if you're a masochist?

:Marco

On Wednesday, October 17, 2012 12:35:47 PM UTC-7, Vitaly Puzrin wrote:
>
> http://nodejs.org/api/stream.html#stream_event_data
>
> In 99%, this pattern is used to glue POST data:
>
> request.on('data', function(chunk) {
>     body += chunk;
> });
>
>
> 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.
>
> Is it intentional behaviour or error?
>

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to