/* Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: */
static void normalize_locale_str(char *dst, char *str, size_t buflen)
/* Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: */
static void normalize_locale_str(char *dst, char *str, size_t buflen)
{
    char *ptr;
    ptr = SDL_strchr(str, '.');
    if (ptr != NULL) {
        *ptr = '\0';
    }
    ptr = SDL_strchr(str, '@');
    if (ptr != NULL) {
        *ptr = '\0';
    }
    if ((str[0] == 'C') && (str[1] == '\0')) {
        return;
    }
    if (*str) {
        if (*dst) {
            SDL_strlcat(dst, ",", buflen);
        }
        SDL_strlcat(dst, str, buflen);
    }
}