Questions tagged [quoted-printable]

A widely used email encoding that represents all bytes as printable 7-bit ASCII characters using `=` as the escape character, while also limiting line length to 76.

From https://en.wikipedia.org/wiki/Quoted-printable (slightly edited):

Quoted-Printable, or QP encoding, is an encoding using printable ASCII characters [...] to transmit 8-bit data over a 7-bit data path or, generally, over a medium which is not 8-bit clean.

It is defined as a MIME content transfer encoding for use in e-mail. QP works by using the equals sign = as an escape character.

It also limits line length to 76, as some software has limits on line length.

Quoted-Printable is efficient and reasonably human-readable only for input text with mostly 7-bit ASCII characters, such as English text.

105 questions
64
votes
3 answers

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

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…
TheSoftwareJedi
  • 34,421
  • 21
  • 109
  • 151
29
votes
15 answers

C#: Class for decoding Quoted-Printable encoding?

Is there an existing class in C# that can convert Quoted-Printable encoding to String? Click on the above link to get more information on the encoding. The following is quoted from the above link for your convenience. Any 8-bit byte value may be…
Lopper
  • 3,499
  • 7
  • 38
  • 57
13
votes
3 answers

Encode MIMEText as quoted printables

Python supports a quite functional MIME-Library called email.mime. What I want to achieve is to get a MIME Part containing plain UTF-8 text to be encoded as quoted printables and not as base64. Although all functionallity is available in the…
theomega
  • 31,591
  • 21
  • 89
  • 127
9
votes
1 answer

PHP sent emails have =0A=0A instead of new lines

For some time now I've had the problem of some of my users getting =0A=0A instead of new lines in emails I send to them via PHP. Correspondence via email client works well, but PHP generated emails always look like this with some users (a minority).…
Swader
  • 11,387
  • 14
  • 50
  • 84
9
votes
3 answers

Encoding issue : decode Quoted-Printable string in Python

In Python, I got a string encoded in Quoted-Printable encoding mystring="=AC=E9" This string should be printed as é So I want to decode it and encode it in UTF-8, I guess. I understand that something is possible through import…
hans glick
  • 2,431
  • 4
  • 25
  • 40
8
votes
6 answers

decoding quoted-printables

I am looking for a way to decode quoted-printables. The quoted-printables are for arabic characters and look like this: =D8=B3=D8=B9=D8=A7=D8=AF I need to convert it to a string, and store it or display.. I've seen post on stackoverflow for the…
Net Solver
  • 127
  • 1
  • 7
7
votes
4 answers

How can I decode quoted-printable content to normal strings in node.js?

For example, I have a string "this=20is=20a=20string" that I want to convert to "this is a string".
dan gibson
  • 3,605
  • 3
  • 39
  • 57
7
votes
0 answers

Code for Encode/Decode QuotedPrintable.

This method Encode your text to QuotedPrintable format public static string EncodeQuotedPrintable(string value) { if (string.IsNullOrEmpty(value)) return value; StringBuilder builder = new StringBuilder(); byte[] bytes =…
Pavel Gr.
  • 141
  • 2
  • 9
5
votes
2 answers

Trailing equal signs (=) in emails

I download messages from a Gmail account using POP3 and save them in a SQLite database for futher processing: mailbox = poplib.POP3_SSL('pop.gmail.com', '995') mailbox.user(user) mailbox.pass_(password) msgnum = mailbox.stat()[0] for i in…
John Manak
  • 13,328
  • 29
  • 78
  • 119
4
votes
1 answer

How to properly decode string with quoted-printable encoding in Ruby

I'm trying to decode what I think is some quoted-printable encoded text that appears in an MBox email archive. I will give one example of some text I am having trouble with. In the MBox, the following text appears: "Demarcation by Theresa…
JustinCEO
  • 55
  • 4
4
votes
1 answer

How to get Email in UTF-8?

I am doing a Python script to get the mail sent by people on my email address. I am using the ImapClient module, and I got the content of the e-mail but prototyped strangely, all my UTF-8 Characters are encoded, like this : No=C3=ABl Here is my…
asa
  • 531
  • 1
  • 5
  • 20
4
votes
1 answer

Zipped attachment breaks email.message.Message.get_payload()

I regularly receive emails with attachments that I must extract and save to disk. I do essentially the following (in Python 2.7): message = email.message_from_file(sys.stdin) for part in message.walk(): path =…
dg99
  • 5,456
  • 3
  • 37
  • 49
4
votes
2 answers

Ruby IMAP library doesn't decode mail subject

I have got mail message with following subject in my Gmail accout: "400, значение, значение" Here is the code I use to grab mail: imap = Net::IMAP.new('imap.gmail.com', 993, true, nil, false) imap.login(LOGIN, PASSWORD)…
Oksana
  • 13,442
  • 10
  • 53
  • 89
4
votes
5 answers

Decoding quoted-printable messages in Swift

I have a quoted-printable string such as "The cost would be =C2=A31,000". How do I convert this to "The cost would be £1,000". I'm just converting text manually at the moment and this doesn't cover all cases. I'm sure there is just one line of code…
iphaaw
  • 6,764
  • 11
  • 58
  • 83
4
votes
1 answer

Rails Mailer quoted-printable replace = by =3D

I've been facing this bug for a long time now, read a lot of "solution" but none works for me. When I send an email with Rails, I received it but all my image on it are not working because of this quoted-printable issue. For example I have this code…
ZazOufUmI
  • 3,212
  • 6
  • 37
  • 67
1
2 3 4 5 6 7