Gnus development mailing list
 help / color / mirror / Atom feed
* base64 encoding
@ 2010-12-28 22:39 Eric Abrahamsen
  2011-01-02  5:43 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Abrahamsen @ 2010-12-28 22:39 UTC (permalink / raw)
  To: ding

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=iso-2022-jp-2, Size: 2098 bytes --]

I get emails from one particular gmail user where the body of the email
is base64 encoded (I've only seen base64 encoded emails from this one
person, I'm 99% sure she doesn't know anything about it). Often a few
lines or a whole paragraph will be mis-encoded, coming through as
gibberish, and then returned to normal. I also use gmail and the same
email viewed via the gmail web interface is correctly displayed. In the
raw article (both in gnus and via gmail) it looks like this:

--8<---------------cut here---------------start------------->8---
Content-Type: text/plain; charset=GB2312
Content-Transfer-Encoding: base64

SGV5LAoKx+vOysTjysfU2rnK0uK2us7Sv6rQxMLwo7/Kx7vysrvKx6OssrvSqr30o6y3tNX9ztK/
--8<---------------cut here---------------end--------------->8---

And then a huge block of text thus encoded, actually two blocks. These
emails are in Chinese, hence the GB2312 encoding. They don't always come
through garbled.

The last time I noticed this, it happened to the middle section of a
paragraph:

Cannon$A8x$B2fOB(B?$B;L$(DVy$A"A$Bg[9D$AWJ+#,N$B1Ugk$AZI$B%#$A,R$BIH$A*UbJWJ+6TN$B0M:!Di$A+D$(DZQUK$A,6xN$B0l8H4<$AxK{;XPE8$(D:'(B
$A_K{N$B1U$(DW@$Bi9RZ$A,N$BLi9S$A\P$BO:$AMUbJWJ+#,R$BIH$A*K{L$(D02$Ap<$B$6$A/#,>$B!W$(DWC$A{I$B6"=_B`(B?``$BB>$ABh$BE*!$IT@'2f<L(B
$BE*(B''$BP;A3M-(B``$AN*$BN;$AK5$B<)$AK5(B''$BE*7y5?!#(B

This should look like (copied/pasted from gmail):

Cannon$A8x$B2fOB::IR$A7"$BN;0l<s$AJ+$B!$2fWL]|$AI%$B!$0x$AN*Ub$B<s$AJ+6T$B2fMh$AK5$BB@$ADQ$BN;!$<)2f$A;9$BKW(B
$A8x$BB>2s?.9p$AK_$BB>2fWL$ARE$B48!$2fITG=6U$AIMUb$B<s$AJ+$B!$0x$AN*$BB>FC$A1p$B7c$A6/$B!$?T4IB>>eMh="$AK5(B
$B!HB>$ABh$BE*!$IT@'2f<LE*!IP;A3M-!H$AN*$BN;$AK5$B<)$AK5$B!IE*7y5?!#(B

That will mean something to Chinese speakers. The encoding may or may
not be going wonky several Chinese characters after the appearance of
ascii (Cannon), but it seems pretty obvious that it's the double quotes
(appearing as two single backtics in gnus, a proper unicode left double
quotation mark in gmail) that gets the encoding back on track.

Does this ring any bells for the encoding gurus out there?

Thanks,
Eric




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: base64 encoding
  2010-12-28 22:39 base64 encoding Eric Abrahamsen
@ 2011-01-02  5:43 ` Lars Magne Ingebrigtsen
  2011-01-05 18:01   ` Eric Abrahamsen
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-01-02  5:43 UTC (permalink / raw)
  To: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Does this ring any bells for the encoding gurus out there?

*looks around*

It doesn't to me, either.  I would guess that the base64 is slightly
invalid, and that Emacs decodes it too strictly.

Could you forward a complete article and point out where things go wrong?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: base64 encoding
  2011-01-02  5:43 ` Lars Magne Ingebrigtsen
@ 2011-01-05 18:01   ` Eric Abrahamsen
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Abrahamsen @ 2011-01-05 18:01 UTC (permalink / raw)
  To: ding

On Sun, Jan 02 2011, Lars Magne Ingebrigtsen wrote:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Does this ring any bells for the encoding gurus out there?
>
> *looks around*
>
> It doesn't to me, either.  I would guess that the base64 is slightly
> invalid, and that Emacs decodes it too strictly.
>
> Could you forward a complete article and point out where things go wrong?

I forwarded the latest email to display the behavior to you off-list,
thanks for looking at this! I note that, as soon as it's forwarded, the
message is apparently decoded correctly, and all the characters display
as they're meant to…

Thanks again,
Eric




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-05 18:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-28 22:39 base64 encoding Eric Abrahamsen
2011-01-02  5:43 ` Lars Magne Ingebrigtsen
2011-01-05 18:01   ` Eric Abrahamsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).