Hello,
I'm using OpenGL and I need to pass to a function array of bytes.
glCallLists(len('text'), GL_UNSIGNED_BYTES, 'text');
This way it's working fine. But I need to pass unicode text. I think that it should work like this:
text = u'unicode text'
glCallLists(len(text), GL_UNSIGNED_SHORT, convert_to_array_of_words(text));
Here I use GL_UNSIGNED_SHORT
that says I'll give array where each element takes 2 bytes, and somehow convert unicode text to array of words.
So, how can I convert unicode string to "raw" array of chars' numbers?