Supports UTF 8 encoding

Hi,

GLFW supports UTF 8 encoding for functions XSetClassHint
I think for sure it is, how to set it up?

–Rafał

GLFW has UTF-8 Unicode support since version 3.0. To set a UTF-8 window title simply pass the UTF-8 string to the title parameter of glfwCreateWindow.

HI @Rafal,

Apologies - I linked to the required documentation but there’s a fair amount there so I’ll summarise:

During window creation GLFW sets the res_name and res_class properties to the title parameter of the call to glfwCreateWindow function, unless the environment variable RESOURCE_NAME is set, or the window hints GLFW_X11_CLASS_NAME or GLFW_X11_INSTANCE_NAME are set.

See the glfwCreateWindow documentation for more.

In your example it looks like there is an issue with the resource name not being displayed as utf-8. This could be a bug, though it looks like res_name is expected to be in the encoding of the current locale - so you may need to set a utf-8 locale for this to work. I am not an expert on this so I’m not sure.