What is "=C2=A0" in MIME encoded, quoted-printable text?

EncodingMimeQuoted Printable

Encoding Problem Overview


This is an example raw email I am trying to parse:

MIME-version: 1.0
Content-type: text/html; charset=UTF-8
Content-transfer-encoding: quoted-printable
X-Mailer: Verizon Webmail
X-Originating-IP: [x.x.x.x]

=C2=A0test testing testing 123

What is =C2=A0? I have tried a half dozen quoted-printable parsers, but none handle this correctly. How would one properly parse this in C#?

Honestly, for now, I'm coding:

//TODO WTF
encoded = encoded.Replace("=C2=A0", "");

Because I can't figure out why that text is there randomly within the MIME content, and isn't supposed to be rendered into anything. By just removing it, I'm getting the desired effect - but WHY?!

To be clear, I know that (=[0-9A-F]{2}) is an encoded character. But in this case, it seemingly represents NOTHING.

Encoding Solutions


Solution 1 - Encoding

=C2=A0 represents the bytes C2 A0. Since this is UTF-8, it translates to U+00A0, which is the Unicode for non-breaking space.

See UTF-8 (Wikipedia).

Solution 2 - Encoding

%C2%A0 is a non breaking space

Solution 3 - Encoding

%C2%A0 This is the code of a hidden folder, create a hidden folder and save in it, for example, a text file, then open this file through a browser and you will see these characters in the search bar. As I understand it, these characters are optional and do not translate to other code.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionTheSoftwareJediView Question on Stackoverflow
Solution 1 - EncodingSteven SuditView Answer on Stackoverflow
Solution 2 - EncodingYi YangView Answer on Stackoverflow
Solution 3 - EncodingYgorView Answer on Stackoverflow