On Mon, Oct 10, 2022 at 12:49:19PM +0000, Andy Smith via BitFolk Users wrote:
I've created a minimal test script:
https://gist.github.com/grifferz/ca9e8f60a03f3691b07c1c12746b7f0f#file-test…
The email that it produces displays fine for me, and for three other
people using Outlook, but NOT for the person who is seeing £ mangled
to £ in the billing renewal emails. They get everything similarly
mangled.
The problem was that this particular version of Outlook does not
accept:
Content-Type: text/plain; charset="utf8"
Everything else is fine with that, including every other version of
Outlook I could find a volunteer tester for, but this one wants:
Content-Type: text/plain; charset="UTF-8"
otherwise it ignores it and uses its default encoding which was set
to "Western European".
Perl's MIME::Entity module doesn't know what all the valid charsets
are, so it would even let me do this:
my $top = MIME::Entity->build(
Charset => 'foobar',
# …
);
which would end up in the email as written, the difference being
that such an email would be garbled almost everywhere instead of
working almost everywhere!
I had spotted this difference between mails sent by me personally
and emails sent using MIME::Entity, and was working on testing that
when some of you contacted me off-list to also suggest this. Well
done!
And of course thanks to everyone who helped with the testing.
I haven't yet folded the fixes back into the real billing scripts,
but I will do over the next few days, and will be able to write some
tests for things that are not "UTF-8"!
The fixed version of the test script is here:
https://gist.github.com/grifferz/ca9e8f60a03f3691b07c1c12746b7f0f#file-test…
Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting