Skip to content
Snippets Groups Projects
Commit 1036e892 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Convert non-UTF-8 message header fields (to/from) to UTF-8

Some messages come from non-English locales with non-UTF-8 charsets
(e.g. CP437), so their to/from fields may contain non-ASCII/non-UTF-8
characters (e.g. "Björn Felte") - so convert these fields (to/from)
to UTF-8, as needed. Uses the new(ish) utf8_encode() function, so you
must have a recent v3.17c build.
I did not transcode message subjects as I'm not clear how they are stored
and copied here. That's probably something better handled by echicken.
parent 8215b2f4
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -948,10 +948,10 @@ function getMessageThreads(sub, max) {
attr : header.attr,
auxattr : header.auxattr,
number : header.number,
from : header.from,
from : header.is_utf8 ? header.from : utf8_encode(header.from),
from_ext : header.from_ext,
from_net_addr : header.from_net_addr,
to : header.to,
to : header.is_utf8 ? header.to : utf8_encode(header.to),
when_written_time : header.when_written_time,
upvotes : (header.attr&MSG_POLL ? 0 : (header.upvotes || 0)),
downvotes : (header.attr&MSG_POLL ? 0 : (header.downvotes || 0)),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment