aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-01-21 04:41:10 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-01-21 04:41:10 +0000
commit9e5073da15a5359189724b670e5ed19cb6c4b0cb (patch)
tree129fa1e38f484d4d38179df9fac7ba03cd2b68a0
parentb103e4cf960dd4c9e601d63206388f35b657f19a (diff)
several code conversion fix.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@27 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.ja7
-rw-r--r--src/codeconv.c5
-rw-r--r--src/codeconv.h2
-rw-r--r--src/compose.c2
-rw-r--r--src/html.c2
-rw-r--r--src/sourcewindow.c5
-rw-r--r--src/textview.c6
-rw-r--r--src/unmime.c2
9 files changed, 29 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 82b44a92..be80727a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,13 @@
2005-01-21
* src/colorlabel.c: removed include of gdk/gdkx.h.
+ * src/compose.c: compose_connect_changed_callbacks(): fixed a typo.
+ * src/codeconv.[ch]: added conv_utf8todisp().
+ * src/sourcewindow.c: source_window_append()
+ src/textview.c: textview_write_line(), textview_write_link()
+ src/unmime.c: unmime_header()
+ src/html.c: html_read_line(): assume the encoding of source
+ string is UTF-8 instead of locale encoding.
2005-01-20
diff --git a/ChangeLog.ja b/ChangeLog.ja
index ad3dbcbb..e07830e2 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,6 +1,13 @@
2005-01-21
* src/colorlabel.c: gdk/gdkx.h の include を削除。
+ * src/compose.c: compose_connect_changed_callbacks(): typo を修正。
+ * src/codeconv.[ch]: conv_utf8todisp() を追加。
+ * src/sourcewindow.c: source_window_append()
+ src/textview.c: textview_write_line(), textview_write_link()
+ src/unmime.c: unmime_header()
+ src/html.c: html_read_line(): ソース文字列を locale
+ エンコーディングではなく UTF-8 と仮定。
2005-01-20
diff --git a/src/codeconv.c b/src/codeconv.c
index 28659b2f..0b73d900 100644
--- a/src/codeconv.c
+++ b/src/codeconv.c
@@ -782,6 +782,11 @@ void conv_euctodisp(gchar *outbuf, gint outlen, const gchar *inbuf)
conv_euctoutf8(outbuf, outlen, inbuf);
}
+void conv_utf8todisp(gchar *outbuf, gint outlen, const gchar *inbuf)
+{
+ strncpy2(outbuf, inbuf, outlen);
+}
+
void conv_anytodisp(gchar *outbuf, gint outlen, const gchar *inbuf)
{
conv_anytoutf8(outbuf, outlen, inbuf);
diff --git a/src/codeconv.h b/src/codeconv.h
index 7f3fee8c..2d1bf46d 100644
--- a/src/codeconv.h
+++ b/src/codeconv.h
@@ -189,6 +189,8 @@ CharSet conv_guess_ja_encoding(const gchar *str);
void conv_jistodisp (gchar *outbuf, gint outlen, const gchar *inbuf);
void conv_sjistodisp (gchar *outbuf, gint outlen, const gchar *inbuf);
void conv_euctodisp (gchar *outbuf, gint outlen, const gchar *inbuf);
+void conv_utf8todisp (gchar *outbuf, gint outlen, const gchar *inbuf);
+void conv_anytodisp (gchar *outbuf, gint outlen, const gchar *inbuf);
void conv_ustodisp (gchar *outbuf, gint outlen, const gchar *inbuf);
void conv_latintodisp (gchar *outbuf, gint outlen, const gchar *inbuf);
void conv_noconv (gchar *outbuf, gint outlen, const gchar *inbuf);
diff --git a/src/compose.c b/src/compose.c
index ac840b43..7520acf9 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -4266,7 +4266,7 @@ static Compose *compose_create(PrefsAccount *account, ComposeMode mode)
static void compose_connect_changed_callbacks(Compose *compose)
{
- GtkTextView *text = GTK_TEXT_VIEW(compose->text);;
+ GtkTextView *text = GTK_TEXT_VIEW(compose->text);
GtkTextBuffer *buffer;
buffer = gtk_text_view_get_buffer(text);
diff --git a/src/html.c b/src/html.c
index 2c706c94..71c088ac 100644
--- a/src/html.c
+++ b/src/html.c
@@ -451,7 +451,7 @@ static HTMLState html_read_line(HTMLParser *parser)
if (conv_convert(parser->conv, buf2, sizeof(buf2), buf) < 0) {
index = parser->bufp - parser->buf->str;
- conv_localetodisp(buf2, sizeof(buf2), buf);
+ conv_utf8todisp(buf2, sizeof(buf2), buf);
g_string_append(parser->buf, buf2);
parser->bufp = parser->buf->str + index;
diff --git a/src/sourcewindow.c b/src/sourcewindow.c
index 550e6fb3..64bf30ea 100644
--- a/src/sourcewindow.c
+++ b/src/sourcewindow.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -154,8 +154,7 @@ void source_window_append(SourceWindow *sourcewin, const gchar *str)
len = strlen(str) + 1;
Xalloca(out, len, return);
-#warning FIXME_GTK2
- conv_localetodisp(out, len, str);
+ conv_utf8todisp(out, len, str);
gtk_text_buffer_get_iter_at_offset(buffer, &iter, -1);
gtk_text_buffer_insert(buffer, &iter, out, -1);
diff --git a/src/textview.c b/src/textview.c
index da860bfe..2d5f6754 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2004 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2005 Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -941,7 +941,7 @@ static void textview_write_line(TextView *textview, const gchar *str,
if (!conv)
strncpy2(buf, str, sizeof(buf));
else if (conv_convert(conv, buf, sizeof(buf), str) < 0)
- conv_localetodisp(buf, sizeof(buf), str);
+ conv_utf8todisp(buf, sizeof(buf), str);
strcrchomp(buf);
//if (prefs_common.conv_mb_alnum) conv_mb_alnum(buf);
@@ -997,7 +997,7 @@ void textview_write_link(TextView *textview, const gchar *str,
if (!conv)
strncpy2(buf, str, sizeof(buf));
else if (conv_convert(conv, buf, sizeof(buf), str) < 0)
- conv_localetodisp(buf, sizeof(buf), str);
+ conv_utf8todisp(buf, sizeof(buf), str);
strcrchomp(buf);
diff --git a/src/unmime.c b/src/unmime.c
index bb9e2822..65d279f6 100644
--- a/src/unmime.c
+++ b/src/unmime.c
@@ -120,7 +120,7 @@ void unmime_header(gchar *out, const gchar *str)
g_free(conv_str);
} else {
len = strlen(decoded_text);
- conv_localetodisp(outp, len + 1, decoded_text);
+ conv_utf8todisp(outp, len + 1, decoded_text);
}
outp += len;