( cvs diff -u -r 1.382.2.261 -r 1.382.2.262 src/compose.c; cvs diff -u -r 1.204.2.83 -r 1.204.2.84 src/prefs_common.c; ) > 2.1.0cvs29.patchset
( cvs diff -u -r 1.149.2.46 -r 1.149.2.47 src/inc.c; ) > 2.1.0cvs30.patchset
( cvs diff -u -r 1.382.2.262 -r 1.382.2.263 src/compose.c; ) > 2.1.0cvs31.patchset
+( cvs diff -u -r 1.10.2.18 -r 1.10.2.19 src/prefs_gtk.c; ) > 2.1.0cvs32.patchset
g_return_if_fail(label != NULL);
g_return_if_fail(rcfile != NULL);
+ if (encoding != NULL)
+ g_warning("Encoding is ignored\n");
+
debug_print("Reading configuration...\n");
prefs_set_default(param);
switch (param[i].type) {
case P_STRING:
{
- gchar *tmp;
+ gchar *tmp = NULL;
- tmp = *value ?
- conv_codeset_strdup(value,
- conv_get_locale_charset_str(),
- CS_UTF_8)
- : g_strdup("");
+ if (*value) {
+ if (g_utf8_validate(value, -1, NULL))
+ tmp = g_strdup(value);
+ else {
+ tmp = conv_codeset_strdup(value,
+ conv_get_locale_charset_str_no_utf8(),
+ CS_INTERNAL);
+ }
+ } else {
+ tmp = g_strdup("");
+ }
if (!tmp) {
g_warning("failed to convert character set.");
tmp = g_strdup(value);
gchar *tmp = NULL;
if (*((gchar **)param[i].data)) {
- tmp = conv_codeset_strdup(*((gchar **)param[i].data),
- CS_UTF_8,
- conv_get_locale_charset_str());
- if (!tmp)
+ if (g_utf8_validate(*((gchar **)param[i].data), -1, NULL))
tmp = g_strdup(*((gchar **)param[i].data));
+ else {
+ tmp = conv_codeset_strdup(*((gchar **)param[i].data),
+ conv_get_locale_charset_str_no_utf8(),
+ CS_INTERNAL);
+ if (!tmp)
+ tmp = g_strdup(*((gchar **)param[i].data));
+ }
}
g_snprintf(buf, sizeof(buf), "%s=%s\n", param[i].name,
tmp = envstr && *envstr ?
conv_codeset_strdup(envstr,
conv_get_locale_charset_str(),
- CS_UTF_8)
+ CS_INTERNAL)
: g_strdup("");
if (!tmp) {
g_warning("faild to convert character set.");