aboutsummaryrefslogtreecommitdiff
path: root/src/codeconv.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-06-10 09:28:05 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-06-10 09:28:05 +0000
commit2ce75a37bcca6a5c960c1fb56b530c24de5a8492 (patch)
tree0c67890575d8e869cef9e8e67e14b12e7959b0d2 /src/codeconv.c
parent7ac4bf2db5d09d02f9e0e7ca4da691b7bd5ff0d9 (diff)
fixed Turkish locale problem.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@333 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/codeconv.c')
-rw-r--r--src/codeconv.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/codeconv.c b/src/codeconv.c
index aff5711a..9ad84724 100644
--- a/src/codeconv.c
+++ b/src/codeconv.c
@@ -890,7 +890,7 @@ conv_get_fallback_for_private_encoding(const gchar *encoding)
{
if (encoding && (encoding[0] == 'X' || encoding[0] == 'x') &&
encoding[1] == '-') {
- if (!g_strcasecmp(encoding, CS_X_GBK))
+ if (!g_ascii_strcasecmp(encoding, CS_X_GBK))
return CS_GBK;
}
@@ -1472,14 +1472,15 @@ CharSet conv_get_locale_charset(void)
/* "ja_JP.EUC" matches with "ja_JP.eucJP", "ja_JP.EUC" and
"ja_JP". "ja_JP" matches with "ja_JP.xxxx" and "ja" */
- if (!strncasecmp(cur_locale, locale_table[i].locale,
- strlen(locale_table[i].locale))) {
+ if (!g_ascii_strncasecmp(cur_locale, locale_table[i].locale,
+ strlen(locale_table[i].locale))) {
cur_charset = locale_table[i].charset;
return cur_charset;
} else if ((p = strchr(locale_table[i].locale, '_')) &&
!strchr(p + 1, '.')) {
if (strlen(cur_locale) == 2 &&
- !strncasecmp(cur_locale, locale_table[i].locale, 2)) {
+ !g_ascii_strncasecmp(cur_locale,
+ locale_table[i].locale, 2)) {
cur_charset = locale_table[i].charset;
return cur_charset;
}
@@ -1534,14 +1535,15 @@ CharSet conv_get_outgoing_charset(void)
for (i = 0; i < sizeof(locale_table) / sizeof(locale_table[0]); i++) {
const gchar *p;
- if (!strncasecmp(cur_locale, locale_table[i].locale,
- strlen(locale_table[i].locale))) {
+ if (!g_ascii_strncasecmp(cur_locale, locale_table[i].locale,
+ strlen(locale_table[i].locale))) {
out_charset = locale_table[i].out_charset;
break;
} else if ((p = strchr(locale_table[i].locale, '_')) &&
!strchr(p + 1, '.')) {
if (strlen(cur_locale) == 2 &&
- !strncasecmp(cur_locale, locale_table[i].locale, 2)) {
+ !g_ascii_strncasecmp(cur_locale,
+ locale_table[i].locale, 2)) {
out_charset = locale_table[i].out_charset;
break;
}
@@ -1615,7 +1617,7 @@ gboolean conv_is_ja_locale(void)
is_ja_locale = 0;
cur_locale = conv_get_current_locale();
if (cur_locale) {
- if (g_strncasecmp(cur_locale, "ja", 2) == 0)
+ if (g_ascii_strncasecmp(cur_locale, "ja", 2) == 0)
is_ja_locale = 1;
}