What encoding is used by functions such as glGetString and glGetShaderInfoLog
opengl
Solution
OpenGL 4.3 Compatibility Profile Specification, section 22.2, page 627:
String queries return pointers to UTF-8 encoded, null-terminated static strings describing properties of the current GL context.
As far as I can see the spec doesn't mention the encoding of `glGetShaderInfoLog()`.
Problem
OpenGL has a few functions like `glGetString` and `glGetShaderInfoLog` that return strings. What form of text encoding is used for these? I assume, given that they're returned as a `GLchar*`, that it is ASCII encoded text contained in the return value but is this specified anywhere? As a second and related point, what text encoding is expected by functions such as `glShaderSource` and `glBindAttribLocation`. Do GLSL programs have to be encoded in ASCII or can it be UTF-8?