Commit e13663d6 authored by Ben Noordhuis's avatar Ben Noordhuis
Browse files

src: network interface names are UTF-8 encoded

Fixes a bug that was introduced in commit f674b09f when v8::String::New()
calls were replaced with calls to one-byte, two-byte and UTF-8 versions.
It turns out that for network interface names, using a one-byte encoding
can produce the wrong results on Windows.  Use UTF-8 instead.

Libuv on Windows correctly encodes non-ASCII characters in the interface
name as UTF-8.  On Unices however, the interface name is just a binary
string with no particular encoding; that's why on UNIX platforms, we
keep interpreting it as a one-byte string.

Fixes joyent/node#8633.

PR-URL: https://github.com/node-forward/node/pull/44


Reviewed-By: default avatarBert Belder <bertbelder@gmail.com>
parent 7ab73ff7
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment