GNU bug report logs - #33612
Gnus doesn’t display EBCDIC encoded mails correctly

Previous Next

Packages: gnus, emacs;

Reported by: Thomas Schneider <qsx <at> chaotikum.eu>

Date: Tue, 4 Dec 2018 16:35:01 UTC

Severity: normal

Tags: fixed

Found in version 5.13

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 33612 in the body.
You can then email your comments to 33612 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#33612; Package emacs,gnus. (Tue, 04 Dec 2018 16:35:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thomas Schneider <qsx <at> chaotikum.eu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org. (Tue, 04 Dec 2018 16:35:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thomas Schneider <qsx <at> chaotikum.eu>
To: submit <at> debbugs.gnu.org
Subject: Gnus doesn’t display EBCDIC encoded mails
 correctly
Date: Tue, 04 Dec 2018 17:34:16 +0100
If you read this subject and ask yourself “What in the name of—?!”, yes,
exactly.  This is cursed and should really not be a real-world issue,
but I still consider it a bug.

When viewing a mail whose headers and/or body is EBCDIC encoded, Gnus
does not decode it correctly.

Given this mail …

```
From: =?EBCDIC-INT?B?44iWlIGiQOKDiJWFiYSFmQ==?= <qsx <at> qsx.re>
To: =?EBCDIC-INT?B?44iWlIGiQOKDiJWFiYSFmQ==?= <qsx <at> qsx.re>
Date: Tue, 04 Dec 2018 16:55:15 +0100
Subject: =?EBCDIC-INT?B?44iJokCipIKRhYOjQImiQImVQMXCw8TJww==?=
Content-Type: text/plain; charset="EBCDIC-INT"
Content-Transfer-Encoding: base64
Message-ID: <F7A3S3POYB.3P9ZHF8WLUSKQ <at> coruscant.chaotikum.eu>

44iFQJikiYOSQIKZlqaVQIaWp0CRpJSXokCWpYWZQKOIhUCTgamoQISWh0sl
```

the Summary buffer shows (with gnus-summary-line-format "%U%R
%&user-date; %(%[%5k: %-23,23f%]%)%B%s\n") …

```
 .           T16:55:15 [ 1.0k: =?EBCDIC-INT?B?44iWlIGi]  =?EBCDIC-INT?B?44iJokCipIKRhYOjQImiQImVQMXCw8TJww==?=
```

and the Article buffer shows …

```
From: =?EBCDIC-INT?B?44iWlIGiQOKDiJWFiYSFmQ==?= <qsx <at> qsx.re>
Sender: qsx <at> chaotikum.eu
To: =?EBCDIC-INT?B?44iWlIGiQOKDiJWFiYSFmQ==?= <qsx <at> qsx.re>
Subject: =?EBCDIC-INT?B?44iJokCipIKRhYOjQImiQImVQMXCw8TJww==?=
Date: Tue, 04 Dec 2018 16:55:15 +0100 (32 minutes, 23 seconds ago)
Message-ID: <F7A3S3POYB.3P9ZHF8WLUSKQ <at> coruscant.chaotikum.eu>

\343\210\205@\230\244\211\203\222@\202\231\226\246\225@\206\226\247@\221\244\224\227\242@\226\245\205\231@\243\210\205@\223\201\251\250@\204\226\207K%
```

This was copy-pasted from a terminal Emacs, it shows the raw bytes
escaped as octal numbers.

So while the decoding routines work fine on more common charsets like
UTF-8 and ISO 8859-1, they fail on EBCDIC.  Not something likely to be
encountered in real life, but still.


Gnus v5.13
GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.1)
 of 2018-10-25




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#33612; Package emacs,gnus. (Tue, 04 Dec 2018 17:36:02 GMT) Full text and rfc822 format available.

Message #8 received at 33612 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Thomas Schneider <qsx <at> chaotikum.eu>
Cc: 33612 <at> debbugs.gnu.org
Subject: Re: bug#33612: Gnus doesn’t display EBCDIC encoded
 mails correctly
Date: Tue, 04 Dec 2018 19:34:51 +0200
> From: Thomas Schneider <qsx <at> chaotikum.eu>
> Date: Tue, 04 Dec 2018 17:34:16 +0100
> 
> If you read this subject and ask yourself “What in the name of—?!”, yes,
> exactly.  This is cursed and should really not be a real-world issue,
> but I still consider it a bug.
> 
> When viewing a mail whose headers and/or body is EBCDIC encoded, Gnus
> does not decode it correctly.
> 
> Given this mail …
> 
> ```
> From: =?EBCDIC-INT?B?44iWlIGiQOKDiJWFiYSFmQ==?= <qsx <at> qsx.re>
> To: =?EBCDIC-INT?B?44iWlIGiQOKDiJWFiYSFmQ==?= <qsx <at> qsx.re>
> Date: Tue, 04 Dec 2018 16:55:15 +0100
> Subject: =?EBCDIC-INT?B?44iJokCipIKRhYOjQImiQImVQMXCw8TJww==?=
> Content-Type: text/plain; charset="EBCDIC-INT"
> Content-Transfer-Encoding: base64
> Message-ID: <F7A3S3POYB.3P9ZHF8WLUSKQ <at> coruscant.chaotikum.eu>
> 
> 44iFQJikiYOSQIKZlqaVQIaWp0CRpJSXokCWpYWZQKOIhUCTgamoQISWh0sl
> ```
> 
> the Summary buffer shows (with gnus-summary-line-format "%U%R
> %&user-date; %(%[%5k: %-23,23f%]%)%B%s\n") …
> 
> ```
>  .           T16:55:15 [ 1.0k: =?EBCDIC-INT?B?44iWlIGi]  =?EBCDIC-INT?B?44iJokCipIKRhYOjQImiQImVQMXCw8TJww==?=
> ```

Does it help to evaluate the below?

  (define-coding-system-alias 'ebcdic-int 'ebcdic-us)




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#33612; Package emacs,gnus. (Tue, 04 Dec 2018 18:04:01 GMT) Full text and rfc822 format available.

Message #11 received at 33612 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Thomas Schneider <qsx <at> chaotikum.eu>
Cc: 33612 <at> debbugs.gnu.org
Subject: Re: bug#33612: Gnus doesn’t display EBCDIC
 encoded mails correctly
Date: Tue, 04 Dec 2018 19:03:45 +0100
On Dez 04 2018, Thomas Schneider <qsx <at> chaotikum.eu> wrote:

> So while the decoding routines work fine on more common charsets like
> UTF-8 and ISO 8859-1, they fail on EBCDIC.  Not something likely to be
> encountered in real life, but still.

Looks like Emacs doesn't know about IBM038 aka EBCDIC-INT.  Other EBCDIC
encodings should work, though.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#33612; Package emacs,gnus. (Tue, 04 Dec 2018 18:31:02 GMT) Full text and rfc822 format available.

Message #14 received at 33612 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 33612 <at> debbugs.gnu.org, qsx <at> chaotikum.eu
Subject: Re: bug#33612: Gnus doesn’t display EBCDIC encoded
 mails correctly
Date: Tue, 04 Dec 2018 20:30:08 +0200
> From: Andreas Schwab <schwab <at> linux-m68k.org>
> Date: Tue, 04 Dec 2018 19:03:45 +0100
> Cc: 33612 <at> debbugs.gnu.org
> 
> On Dez 04 2018, Thomas Schneider <qsx <at> chaotikum.eu> wrote:
> 
> > So while the decoding routines work fine on more common charsets like
> > UTF-8 and ISO 8859-1, they fail on EBCDIC.  Not something likely to be
> > encountered in real life, but still.
> 
> Looks like Emacs doesn't know about IBM038 aka EBCDIC-INT.  Other EBCDIC
> encodings should work, though.

Right, I just added IBM038 on master.




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#33612; Package emacs,gnus. (Sat, 22 Jun 2019 13:15:02 GMT) Full text and rfc822 format available.

Message #17 received at 33612 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Andreas Schwab <schwab <at> linux-m68k.org>, 33612 <at> debbugs.gnu.org,
 qsx <at> chaotikum.eu
Subject: Re: bug#33612: Gnus doesn’t display EBCDIC
 encoded mails correctly
Date: Sat, 22 Jun 2019 15:14:32 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Andreas Schwab <schwab <at> linux-m68k.org>
>> Date: Tue, 04 Dec 2018 19:03:45 +0100
>> Cc: 33612 <at> debbugs.gnu.org
>> 
>> On Dez 04 2018, Thomas Schneider <qsx <at> chaotikum.eu> wrote:
>> 
>> > So while the decoding routines work fine on more common charsets like
>> > UTF-8 and ISO 8859-1, they fail on EBCDIC.  Not something likely to be
>> > encountered in real life, but still.
>> 
>> Looks like Emacs doesn't know about IBM038 aka EBCDIC-INT.  Other EBCDIC
>> encodings should work, though.
>
> Right, I just added IBM038 on master.

And I used the test case posted here, and Gnus indeed now displays this
message correctly.  :-)

So I'm closing the bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 22 Jun 2019 13:15:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 33612 <at> debbugs.gnu.org and Thomas Schneider <qsx <at> chaotikum.eu> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 22 Jun 2019 13:15:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 21 Jul 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 273 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.