aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.ja5
-rw-r--r--src/codeconv.c5
3 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c430516..1cc18fce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2005-01-31
+ * src/codeconv.c: conv_utf8todisp(): replace every 8bit character
+ if the source string is not a valid UTF-8.
+
+2005-01-31
+
* src/defs.h: use original ".sylpheed_cache" for CACHE_FILE.
changed CACHE_VERSION to 0x20.
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 18c265e9..49029d9c 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,5 +1,10 @@
2005-01-31
+ * src/codeconv.c: conv_utf8todisp(): ソース文字列が有効な UTF-8
+ でなければ全ての 8bit 文字を置換するようにした。
+
+2005-01-31
+
* src/defs.h: CACHE_FILE に元の ".sylpheed_cache" を使用。
CACHE_VERSION を 0x20 に変更。
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)