Can someone please tell me how to do this in C#?
Convert from Quoted Printable to binary, and then use UTF-8 encoding to decode that binary to text.
Here is example of text I need quoted:
“Commentaires: Je suis abonn=C3=A9 =C3=A0 la livraison =C3=A0 domicile depuis longtemps.”
OK, so your question is basically two questions in one. First, you need to be able to decode quoted-printable. I’m assuming that you have the encoded text as a string. You’ll have to run through this string with a while-loop, like below. I’ve deliberately left out the part where you turn the two hex characters into a byte; I’m sure you can figure this out for yourself 🙂
At the end of this,
outputcontains the raw bytes. Now all you need to do is decode it using UTF8:If you have any questions, please ask in a comment. And remember: don’t copy and use code that you don’t understand 🙂