I want to dump my monitors(I have only one though), and I used this code:
GLFWmonitor** monitors = glfwGetMonitors(&num);
cout << "Monitors dump:" << endl;
for(int i=0;i<num;i++){
const char* name = glfwGetMonitorName(monitors[i]);
cout << (string)name << endl;
}
The returned string is all obfuscated:
閫氱敤鍗虫彃鍗崇敤鐩戣鍣
I have a Chinese system, but in my system monitor screen, the name is HP N246v
which is DEFINITELY utf-8(no Chinese characters), so I'm thinking, maybe it is utf-8, but encoded in utf-16. Nevertheless, I want glfwGetMonitorName
to return properly encoded strings. Also, I seriously want a way to get GLFW to return utf-16 characters. But it's okay(since utf-16 isn't supported well over libraries and codes due to most English text is in utf-8.)