Subject: bug#33612: Gnus doesn’t display EBCDIC encoded mails correctly

From: Eli Zaretskii <[email-masked]>
Date: Tue, 04 Dec 2018 19:34:51 +0200

> From: Thomas Schneider <[email-masked]>
> 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==?= <[email-masked]>
> To: =?EBCDIC-INT?B?44iWlIGiQOKDiJWFiYSFmQ==?= <[email-masked]>
> 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: <[email-masked]>
> 
> 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)