due to the recent change in KCatalog I found out setlocale() is not called
by many programs unless there are specific requirements and X11 apparently
requires it to function properly
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
void QKeyMapper::clearMappings()
{
+ // NOTE: if nothing called setlocale() it has to be done here for XOpenIM()
+ // to return the locale set via environment variable
+ setlocale(LC_CTYPE, "");
+
XIM im = XOpenIM(qt_x11Data->display, NULL, NULL, NULL);
if (!im) {
keyMapperCodec = QTextCodec::codecForLocale();