rem: WINGsConfiguration.useMultiByte = False; str = WMGetUDStringForKey(defaults, "MultiByteText"); if (str) { if (strcasecmp(str, "YES") == 0) { WINGsConfiguration.useMultiByte = True; } else if (strcasecmp(str, "AUTO") == 0) { char *locale;   locale = setlocale(LC_CTYPE, NULL); if (locale != NULL && (strncmp(locale, "ja", 2) == 0 || strncmp(locale, "zh", 2) == 0 || strncmp(locale, "ru", 2) == 0 || strncmp(locale, "ko", 2) == 0)) {  WINGsConfiguration.useMultiByte = True; } } }
context: W_ReadConfigurations(void){    WMUserDefaults *defaults;    memset(&WINGsConfiguration, 0, sizeof(_WINGsConfiguration));    defaults = WMGetStandardUserDefaults();    if (defaults) {        char *buttonName;        unsigned button;        char *str;        WINGsConfiguration.systemFont =            WMGetUDStringForKey(defaults, "SystemFont");        WINGsConfiguration.boldSystemFont =            WMGetUDStringForKey(defaults, "BoldSystemFont");        WINGsConfiguration.antialiasedText =            WMGetUDBoolForKey(defaults, "AntialiasedText");        WINGsConfiguration.useMultiByte = False;        str = WMGetUDStringForKey(defaults, "MultiByteText");        if (str) {            if (strcasecmp(str, "YES") == 0) {                WINGsConfiguration.useMultiByte = True;            } else if (strcasecmp(str, "AUTO") == 0) {                char *locale;                /* if it's a multibyte language (japanese, chinese or korean)                 * then set it to True */                locale = setlocale(LC_CTYPE, NULL);                if (locale != NULL                    && (strncmp(locale, "ja", 2) == 0                        || strncmp(locale, "zh", 2) == 0                        || strncmp(locale, "ru", 2) == 0                        || strncmp(locale, "ko", 2) == 0)) {                    WINGsConfiguration.useMultiByte = True;                }            }        }        WINGsConfiguration.doubleClickDelay =            WMGetUDIntegerForKey(defaults, "DoubleClickTime");        WINGsConfiguration.floppyPath =            WMGetUDStringForKey(defaults, "FloppyPath");        buttonName = WMGetUDStringForKey(defaults, "MouseWheelUp");        if (buttonName) {            button = getButtonWithName(buttonName, Button4);            wfree(buttonName);        } else {            button = Button4;        }        WINGsConfiguration.mouseWheelUp = button;        buttonName = WMGetUDStringForKey(defaults, "MouseWheelDown");        if (buttonName) {            button = getButtonWithName(buttonName, Button5);            wfree(buttonName);        } else {            button = Button5;        }        WINGsConfiguration.mouseWheelDown = button;        if (WINGsConfiguration.mouseWheelDown==WINGsConfiguration.mouseWheelUp) {            WINGsConfiguration.mouseWheelUp = Button4;            WINGsConfiguration.mouseWheelDown = Button5;        }        WINGsConfiguration.defaultFontSize =            WMGetUDIntegerForKey(defaults, "DefaultFontSize");    }    if (missingOrInvalidXLFD(WINGsConfiguration.systemFont)) {        WINGsConfiguration.systemFont = SYSTEM_FONT;    }    if (missingOrInvalidXLFD(WINGsConfiguration.boldSystemFont)) {        WINGsConfiguration.boldSystemFont = BOLD_SYSTEM_FONT;    }    if (!WINGsConfiguration.floppyPath) {        WINGsConfiguration.floppyPath = FLOPPY_PATH;    }    if (WINGsConfiguration.doubleClickDelay == 0) {        WINGsConfiguration.doubleClickDelay = 250;    }    if (WINGsConfiguration.mouseWheelUp == 0) {        WINGsConfiguration.mouseWheelUp = Button4;    }    if (WINGsConfiguration.mouseWheelDown == 0) {        WINGsConfiguration.mouseWheelDown = Button5;    }    if (WINGsConfiguration.defaultFontSize == 0) {        WINGsConfiguration.defaultFontSize = 12;    }}