summaryrefslogtreecommitdiffstats
path: root/charset.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-09-15 21:18:50 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-09-15 21:18:50 +0000
commit39be8981d5a22d47da60e11539e79a8786648c5a (patch)
tree0dbf6aac1a7de5014f34eef7f53070a3af63c7d8 /charset.c
parent50c0c9196eeb450ab2659621a73e86cb45d627d2 (diff)
Fix the crlf handling.
Diffstat (limited to 'charset.c')
-rw-r--r--charset.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/charset.c b/charset.c
index 158fdeb3..bbdd0d1c 100644
--- a/charset.c
+++ b/charset.c
@@ -377,10 +377,12 @@ static void _state_utf8_flush(STATE *s, CHARSET *chs)
mutt_decode_utf8_string(sfu_buffer, chs);
for(t = sfu_buffer; *t; t++)
{
- /* this is text mode, so throw out raw CRs. */
- if(*t == '\r')
- t++;
-
+ /* This may lead to funny-looking output if
+ * there are embedded CRs, NLs or similar things
+ * - but these would constitute illegal
+ * UTF8 encoding anyways, so we don't care.
+ */
+
state_prefix_putc(*t, s);
}
sfu_bp = 0;
@@ -393,8 +395,7 @@ void state_fput_utf8(STATE *st, char u, CHARSET *chs)
if((u & 0x80) == 0)
{
- if(u && u != '\r')
- state_prefix_putc(u, st);
+ if(u) state_prefix_putc(u, st);
}
else
{