aboutsummaryrefslogtreecommitdiff
path: root/src/codeconv.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-01-17 09:56:35 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-01-17 09:56:35 +0000
commitf0325b36e30c81266a5e6f750553be6bc6e8fe33 (patch)
tree5406555df0907b5ac64766b9bf74bf813e002f8a /src/codeconv.c
parent90906f6a4d71ce0c182026bf3afed3c1859f4359 (diff)
xml.[ch]: automatically convert from input file encoding to UTF-8.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@12 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/codeconv.c')
-rw-r--r--src/codeconv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/codeconv.c b/src/codeconv.c
index 1440f80e..454cb0e4 100644
--- a/src/codeconv.c
+++ b/src/codeconv.c
@@ -964,14 +964,14 @@ gchar *conv_iconv_strdup(const gchar *inbuf,
if (!dest_code)
dest_code = conv_get_internal_charset_str();
- /* don't convert if current codeset is US-ASCII */
- if (!strcasecmp(dest_code, CS_US_ASCII))
- return g_strdup(inbuf);
-
/* don't convert if src and dest codeset are identical */
if (!strcasecmp(src_code, dest_code))
return g_strdup(inbuf);
+ /* don't convert if current codeset is US-ASCII */
+ if (!strcasecmp(dest_code, CS_US_ASCII))
+ return g_strdup(inbuf);
+
cd = iconv_open(dest_code, src_code);
if (cd == (iconv_t)-1)
return NULL;