2005-04-20 [paul] 1.9.6cvs43

* src/codeconv.c
		complete 1.9.6cvs42's sync:
		Fallback to GBK if "X-GBK" is passed (thanks to SuperMMX)
This commit is contained in:
Paul Mangan 2005-04-20 04:14:07 +00:00
parent 426ea19446
commit f6be1f6807
4 changed files with 24 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2005-04-20 [paul] 1.9.6cvs43
* src/codeconv.c
complete 1.9.6cvs42's sync:
Fallback to GBK if "X-GBK" is passed (thanks to SuperMMX)
2005-04-19 [paul] 1.9.6cvs42
sync with main:
@ -10,8 +16,7 @@
* src/mainwindow.c
* src/messageview.c
* src/prefs_common.c
support GBK encoding. Fallback to GBK if "X-GBK"
is passed (thanks to SuperMMX)
support GBK encoding.
* src/common/session.c
* src/common/session.h
use separate buffer for large data to be sent,

View file

@ -459,3 +459,4 @@
( cvs diff -u -r 1.382.2.117 -r 1.382.2.118 src/compose.c; ) > 1.9.6cvs40.patchset
( cvs diff -u -r 1.18.2.7 -r 1.18.2.8 src/jpilot.c; ) > 1.9.6cvs41.patchset
( cvs diff -u -r 1.12.2.21 -r 1.12.2.22 src/action.c; cvs diff -u -r 1.65.2.26 -r 1.65.2.27 src/codeconv.c; cvs diff -u -r 1.15.2.6 -r 1.15.2.7 src/codeconv.h; cvs diff -u -r 1.274.2.34 -r 1.274.2.35 src/mainwindow.c; cvs diff -u -r 1.94.2.49 -r 1.94.2.50 src/messageview.c; cvs diff -u -r 1.204.2.34 -r 1.204.2.35 src/prefs_common.c; cvs diff -u -r 1.23.2.4 -r 1.23.2.5 src/common/session.c; cvs diff -u -r 1.8.2.2 -r 1.8.2.3 src/common/session.h; ) > 1.9.6cvs42.patchset
( cvs diff -u -r 1.1.2.498 -r 1.1.2.499 ChangeLog-gtk2.claws; cvs diff -u -r 1.65.2.27 -r 1.65.2.28 src/codeconv.c; ) > 1.9.6cvs43.patchset

View file

@ -11,7 +11,7 @@ MINOR_VERSION=9
MICRO_VERSION=6
INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_VERSION=42
EXTRA_VERSION=43
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=

View file

@ -825,10 +825,24 @@ static void conv_noconv(gchar *outbuf, gint outlen, const gchar *inbuf)
strncpy2(outbuf, inbuf, outlen);
}
static const gchar *
conv_get_fallback_for_private_encoding(const gchar *encoding)
{
if (encoding && (encoding[0] == 'X' || encoding[0] == 'x') &&
encoding[1] == '-') {
if (!g_ascii_strcasecmp(encoding, CS_X_GBK))
return CS_GBK;
}
return encoding;
}
CodeConverter *conv_code_converter_new(const gchar *src_charset)
{
CodeConverter *conv;
src_charset = conv_get_fallback_for_private_encoding(src_charset);
conv = g_new0(CodeConverter, 1);
conv->code_conv_func = conv_get_code_conv_func(src_charset, NULL);
conv->charset_str = g_strdup(src_charset);
@ -870,6 +884,7 @@ gchar *conv_codeset_strdup(const gchar *inbuf,
size_t len;
CodeConvFunc conv_func;
src_code = conv_get_fallback_for_private_encoding(src_code);
conv_func = conv_get_code_conv_func(src_code, dest_code);
if (conv_func != conv_noconv) {
len = (strlen(inbuf) + 1) * 3;