Skip to content

Instantly share code, notes, and snippets.

Created July 4, 2015 23:51
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
1. User types stuff into chat formspec. At this point it is stored as a core::stringw inside irrlicht.
2. User submits the form. guiFormSpecMenu.cpp converts the text to utf8 for submitting it as a formspec field.
3. Since this is the chat formspec, code in game.cpp intercepts the formspec submission.
4. game.cpp:186 calls narrow_to_wide on the string.
Result: a utf8 string is interpreted as a narrow string for conversion to wide string.
--> on Linux: no effect because narrow == utf8
--> on Windows: BOOM, narrow means CP_ACP, not CP_UTF8.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment