Commit d549f3be authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Force ISO-8859-8 for Hebrew users

parent bb968216
...@@ -97,7 +97,7 @@ static const char *FindFallbackEncoding (const char *locale) ...@@ -97,7 +97,7 @@ static const char *FindFallbackEncoding (const char *locale)
/* Hebrew (ISO-8859-8) */ /* Hebrew (ISO-8859-8) */
if (!locale_match ("he" "iw" "yi", locale)) if (!locale_match ("he" "iw" "yi", locale))
return "CP1255"; // Compatible Microsoft superset return "ISO-8859-8"; // CP1255 is reportedly screwed up
/* Latin-5 Turkish (ISO-8859-9) */ /* Latin-5 Turkish (ISO-8859-9) */
if (!locale_match ("tr" "ku", locale)) if (!locale_match ("tr" "ku", locale))
...@@ -204,8 +204,20 @@ const char *GetFallbackEncoding( void ) ...@@ -204,8 +204,20 @@ const char *GetFallbackEncoding( void )
return FindFallbackEncoding (psz_lang); return FindFallbackEncoding (psz_lang);
#else #else
static char buf[16] = ""; static char buf[16] = "";
if (buf[0] == 0) if (buf[0] == 0)
snprintf (buf, sizeof (buf), "CP%u", GetACP ()); {
int cp = GetACP ();
switch (cp)
{
case 1255: // Hebrew, CP1255 screws up somewhat
strcpy (buf, "ISO-8859-8");
break;
default:
snprintf (buf, sizeof (buf), "CP%u", GetACP ());
}
}
return buf; return buf;
#endif #endif
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment