Subject: Re: bug#68971: Innocent file renders crazy

From: Eli Zaretskii <[email-masked]>
Date: Wed, 07 Feb 2024 17:00:13 +0200

tags 68971 notabug
thanks

> Date: Wed, 07 Feb 2024 22:17:58 +0800
> From: Dan Jacobson <[email-masked]>
> 
> There is something crazy about this attached file that causes emacs to
> display tons of weird characters.
> $ md5sum metadata.html
> 42c875bae87988bbbd4db481b873bc1a metadata.html
> $ emacs -Q metadata.html #crazy!
> GNU Emacs 29.1

It's this part:

  <html lang="en"><head><META http-equiv="Content-Type"
  content="text/html; charset=utf-16"><font face="calibri"><title>
                      ^^^^^^^^^^^^^^

UTF-16 encodes each character below 0x10000 with 2 bytes, so you get
this gibberish if you try to display plain ASCII text as if it were
UTF-16.

This is not a bug.