diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-01-31 07:07:05 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-01-31 07:07:05 +0000 |
commit | e76bf3e452d69b606067dbd1fbe8c64b0e2bf8a1 (patch) | |
tree | 5d52418890557b28e21f7884a8cfc0e1b51f3c85 /src | |
parent | 0d32f61ae924df5815b40c175c535059991a1834 (diff) |
replace every non-UTF8 8bit character in the source window etc.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@58 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/codeconv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/codeconv.c b/src/codeconv.c index 47404702..32b3918f 100644 --- a/src/codeconv.c +++ b/src/codeconv.c @@ -788,7 +788,10 @@ static void conv_euctodisp(gchar *outbuf, gint outlen, const gchar *inbuf) void conv_utf8todisp(gchar *outbuf, gint outlen, const gchar *inbuf) { - strncpy2(outbuf, inbuf, outlen); + if (g_utf8_validate(inbuf, -1, NULL) == TRUE) + strncpy2(outbuf, inbuf, outlen); + else + conv_ustodisp(outbuf, outlen, inbuf); } static void conv_anytodisp(gchar *outbuf, gint outlen, const gchar *inbuf) |