 
            The goal here is to make XIM input locale independent, so changing LC_MESSAGES and LC_CTYPE (to change code pages on PE side) can be done without breaking the IME, when set locale isn't set up on the host system. To achieve this, I switched XmbLookupString to Xutf8LookupString, because it *seems* to achieve what I wrote above. Marked as draft because idk if this makes sense at all.