Gmail eats Python

Steven D'Aprano steve at pearwood.info
Sun Jul 26 00:49:54 EDT 2015


On Sun, 26 Jul 2015 03:47 am, Jussi Piitulainen wrote:

> Just in case anyone cares, Gnus shows me those indentations as octal
> codes, \302\240\302\240 (followed by one ASCII space). I guess a
> \302\240 is a NO-BREAK SPACE in UTF-8, and I guess Gnus does not know
> this because there is no charset specification in the headers. That
> seems to be missing whenever I see these codes instead of properly
> rendered characters and bother to check the headers.

Some of us care :-)

Zachary's post that you are referring to does have the charset declared, but
it uses individual declarations for each of the multipart/alternative
parts:


--001a1134d474c99321051bb5ef45
Content-Type: text/plain; charset=UTF-8


--001a1134d474c99321051bb5ef45
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable


On the other hand, your post sent from Gnus is lying. Despite containing
non-ASCII bytes (i.e. octal \302\240), it sends these headers:


Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 8bit


US-ASCII is 7-bit only and only defines values for ord \0 through \177 in
octal.


-- 
Steven




More information about the Python-list mailing list