Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Issue with ucs2 decode/encode #4431

Closed
peters opened this issue Dec 18, 2012 · 3 comments
Closed

Issue with ucs2 decode/encode #4431

peters opened this issue Dec 18, 2012 · 3 comments

Comments

@peters
Copy link

peters commented Dec 18, 2012

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

Interesting lines are 105 and 117.

@bnoordhuis
Copy link
Member

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
Copy link
Author

peters commented Dec 18, 2012

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
Copy link

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

 new Buffer('abcd', 'ucs2').toString('utf8');
// 'a\u0000b\u0000c\u0000d\u0000'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants