InpuText Input - SDL_KEYDOWN & Chinese Language

I met what I think is a strange bug. I’m following a tutorial on SLD2, everything I write is extremely basic.

My computer is set to Tradiational Chinese with phnetic input by default, every time a new window is opend (as for example a consolle prompt) the user has either to push SHIFT or SHIFT+SPACEBAR to write latin characters.

I have this simple statement for writing text to my console, I also check SDL_KEYDOWN to get the backspaces:

if(ev.type == SDL_TEXTINPUT || ev.type == SDL_KEYDOWN) {
if(ev.type == SDL_KEYDOWN && ev.key.keysym.sym == SDLK_BACKSPACE && text.length() > 0) {
text = text.substr(0, text.length() - 1);
else {
text += ev.text.text;
std::cout << text << std::endl;

Adding ev.type == SDL_KEYDOWN to the code results in all characters being written as subscript of the following gibberish character: [Image: ]

Most probably this has no influence at all on practical applications, still it’s a curious thing.