Re: [AD] Allegro unable to deal with non ascii filenames

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2006-05-29, Chris <chris.kcat@xxxxxxxxxx> wrote:
> +void _unix_guess_file_encoding(void)
> +{
> +   char const *encoding = "unknown";
> +   char *locale = getenv("LC_ALL");
> +   if (!locale)
> +      locale = getenv("LANG");
> +
> +   if (locale) {
> +      if (strstr(locale, "utf8") ||
> +          strstr(locale, "UTF-8") ||
> +          strstr(locale, "utf-8") ||
> +          strstr(locale, "UTF8"))) {
> +         set_file_encoding(U_UTF8);
> +         encoding = "UTF8";
> +      }
> +   }
> +
> +   TRACE(PREFIX_I "Assumed libc encoding is %s.\n", encoding);
> +}

This looks wrong.  For example, on my system I only have
LC_CTYPE=en_AU.UTF-8 and LC_COLLATE=C set.  All the other locale
variables are unset.  AFAIK my setup is okay.

Peter





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/