I have a mail processing engine that reads in emails (usually UTF-8 encrypted) and processes them. I found a neat solution here for how to interpret the control characters. But that answer was given in 2011... and it seems that something has changed since then. Because the code in the referenced answer does a Regex to identify anything of the format =A0
or other hex number and decodes each character individually. But take this string:
Elke=E2=80=99s motto
I fed this into an encode/decode test site and this correctly decoded as
Elke’s motto
But that little apostrophe seems to be generated by a combination of 3 control codes. The code I have takes each code in isolation, and comes out as three separate, unreadable characters.
What code can I use to convert these special characters into the correct human-readable format?