* bug#33612: Gnus doesn’t display EBCDIC encoded mails correctly
@ 2018-12-04 16:34 Thomas Schneider
2018-12-04 17:34 ` Eli Zaretskii
2018-12-04 18:03 ` Andreas Schwab
0 siblings, 2 replies; 5+ messages in thread
From: Thomas Schneider @ 2018-12-04 16:34 UTC (permalink / raw)
To: 33612
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@qsx.re>
To: =?EBCDIC-INT?B?44iWlIGiQOKDiJWFiYSFmQ==?= <qsx@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@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@qsx.re>
Sender: qsx@chaotikum.eu
To: =?EBCDIC-INT?B?44iWlIGiQOKDiJWFiYSFmQ==?= <qsx@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@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
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#33612: Gnus doesn’t display EBCDIC encoded mails correctly
2018-12-04 16:34 bug#33612: Gnus doesn’t display EBCDIC encoded mails correctly Thomas Schneider
@ 2018-12-04 17:34 ` Eli Zaretskii
2018-12-04 18:03 ` Andreas Schwab
1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2018-12-04 17:34 UTC (permalink / raw)
To: Thomas Schneider; +Cc: 33612
> From: Thomas Schneider <qsx@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@qsx.re>
> To: =?EBCDIC-INT?B?44iWlIGiQOKDiJWFiYSFmQ==?= <qsx@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@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)
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#33612: Gnus doesn’t display EBCDIC encoded mails correctly
2018-12-04 16:34 bug#33612: Gnus doesn’t display EBCDIC encoded mails correctly Thomas Schneider
2018-12-04 17:34 ` Eli Zaretskii
@ 2018-12-04 18:03 ` Andreas Schwab
2018-12-04 18:30 ` Eli Zaretskii
1 sibling, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2018-12-04 18:03 UTC (permalink / raw)
To: Thomas Schneider; +Cc: 33612
On Dez 04 2018, Thomas Schneider <qsx@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@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#33612: Gnus doesn’t display EBCDIC encoded mails correctly
2018-12-04 18:03 ` Andreas Schwab
@ 2018-12-04 18:30 ` Eli Zaretskii
2019-06-22 13:14 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2018-12-04 18:30 UTC (permalink / raw)
To: Andreas Schwab; +Cc: 33612, qsx
> From: Andreas Schwab <schwab@linux-m68k.org>
> Date: Tue, 04 Dec 2018 19:03:45 +0100
> Cc: 33612@debbugs.gnu.org
>
> On Dez 04 2018, Thomas Schneider <qsx@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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#33612: Gnus doesn’t display EBCDIC encoded mails correctly
2018-12-04 18:30 ` Eli Zaretskii
@ 2019-06-22 13:14 ` Lars Ingebrigtsen
0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-22 13:14 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Andreas Schwab, 33612, qsx
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Andreas Schwab <schwab@linux-m68k.org>
>> Date: Tue, 04 Dec 2018 19:03:45 +0100
>> Cc: 33612@debbugs.gnu.org
>>
>> On Dez 04 2018, Thomas Schneider <qsx@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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-06-22 13:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-04 16:34 bug#33612: Gnus doesn’t display EBCDIC encoded mails correctly Thomas Schneider
2018-12-04 17:34 ` Eli Zaretskii
2018-12-04 18:03 ` Andreas Schwab
2018-12-04 18:30 ` Eli Zaretskii
2019-06-22 13:14 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.