summary refs log tree commit diff stats
path: root/src/common/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/server.c')
-rw-r--r--src/common/server.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/server.c b/src/common/server.c
index 1ed90d0b..c0fb36a6 100644
--- a/src/common/server.c
+++ b/src/common/server.c
@@ -258,7 +258,10 @@ static void
 server_inline (server *serv, char *line, gssize len)
 {
 	gsize len_utf8;
-	line = text_convert_invalid (line, len, serv->read_converter, unicode_fallback_string, &len_utf8);
+	if (!strcmp (serv->encoding, "UTF-8"))
+		line = text_fixup_invalid_utf8 (line, len, &len_utf8);
+	else
+		line = text_convert_invalid (line, len, serv->read_converter, unicode_fallback_string, &len_utf8);
 
 	fe_add_rawlog (serv, line, len_utf8, FALSE);