Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Issue with ucs2 decode/encode #4431

Closed
peters opened this Issue · 3 comments

3 participants

@peters

Please see https://gist.github.com/4327276/ on line 99.

Interesting lines are 105 and 117.

@bnoordhuis

Everything works as expected.

Um. Is this a bug report or a pat on the back? I'm more used to the former but I don't mind if it's the latter.

@peters

Haha.. well, if you open the gist and look at line 90. When data is encoded using ucs2 there are some wierd whitespace issues.. Compare line 105 and 117.

@trevnorris
Owner

Now sure what the issue is here. The following is expected:

 new Buffer('abcd', 'ucs2').toString('utf8');
// 'a\u0000b\u0000c\u0000d\u0000'
@trevnorris trevnorris closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.