I seem to remember it converts any unknown codes to the Unicode character 
65533 (�).  Giving it a try is easy!

node -e 'console.log(new Buffer([255]).toString().charCodeAt(0))'

On Wednesday, September 3, 2014 1:28:48 AM UTC-7, Mark Hahn wrote:
>
> What happens if I convert an entire buffer to a string using toString and 
> the end of the buffer only has a partial character encoding?  Will it just 
> ignore the extra byte(s)?  (This is what I want).  Or will it have garbage 
> at the end of the string or throw an exception?
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/7eaf08cc-ee6a-4d16-b638-fe049f6ee8ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to