Closed Blankeer closed 5 years ago
if you are on windows, you have to use wchar to store "哈哈" and convert it to utf-8 char* string then call ws->send(utf8_str);
This library is completely agnostic to encoding issues, and takes all the data thrown at it as binary, without taking care to encode it to UTF-8. Thus, it is your responsibility to encode it before calling send(). The example you've provided is not sufficient because - without the exact compiler and platform version - we have no idea what "哈哈" resolves to.
encoding Chinese
node.js console:
thinks.