Better fix for bug #3349 (almost all the needed code was there :-)
[claws.git] / src / codeconv.c
index 85dabf61f61962fbfad932390ad108e4ef14463d..565c0c273109ba4742ec6aaf46e8b2295db27fc0 100644 (file)
@@ -751,7 +751,7 @@ gchar *conv_codeset_strdup(const gchar *inbuf,
 
        if (!strcmp2(src_code, dest_code)) {
                CharSet dest_charset = conv_get_charset_from_str(dest_code);
-               if (dest_charset == C_UTF_8) {
+               if (strict_mode && dest_charset == C_UTF_8) {
                        /* ensure valid UTF-8 if target is UTF-8 */
                        if (!g_utf8_validate(inbuf, -1, NULL)) {
                                return NULL;