[gmime] Don't skip validation of UTF-8 text
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime] Don't skip validation of UTF-8 text
- Date: Sun, 17 Jul 2011 21:04:32 +0000 (UTC)
commit e7b7bab525cd83bfea5c7e685ec79f0e1898aa27
Author: Jeffrey Stedfast <fejj gnome org>
Date: Sun Jul 17 17:04:05 2011 -0400
Don't skip validation of UTF-8 text
2011-07-17 Jeffrey Stedfast <fejj gnome org>
* gmime/gmime-utils.c (charset_convert): Don't skip validation
* of
UTF-8 text.
ChangeLog | 5 +++++
gmime/gmime-utils.c | 8 ++++----
2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index cdb2738..38b2eda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2011-07-17 Jeffrey Stedfast <fejj gnome org>
+ * gmime/gmime-utils.c (charset_convert): Don't skip validation of
+ UTF-8 text.
+
+2011-07-17 Jeffrey Stedfast <fejj gnome org>
+
* gmime/gmime-utils.c (charset_convert): Handle ERANGE the same as
EILSEQ.
diff --git a/gmime/gmime-utils.c b/gmime/gmime-utils.c
index c49af56..ca32b61 100644
--- a/gmime/gmime-utils.c
+++ b/gmime/gmime-utils.c
@@ -1814,10 +1814,10 @@ rfc2047_decode_word (const char *in, size_t inlen)
p = (char *) decoded;
len = declen;
- //while (!g_utf8_validate (p, len, (const char **) &p)) {
- // len = declen - (p - (char *) decoded);
- // *p = '?';
- //}
+ while (!g_utf8_validate (p, len, (const char **) &p)) {
+ len = declen - (p - (char *) decoded);
+ *p = '?';
+ }
return g_strndup ((char *) decoded, declen);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]