Subject: Re: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find multiline regexps

From: Eli Zaretskii <[email-masked]>
Date: Wed, 02 Dec 2020 16:56:34 +0200

> From: Richard Stallman <[email-masked]>
> Cc: [email-masked], [email-masked], [email-masked]
> Date: Tue, 01 Dec 2020 23:26:10 -0500
> 
>   > AFAIU, there's already such an option: -b.  However, byte-to-position
>   > works only with UTF-8 encoded files; we need filepos-to-bufferpos
> 
> Oops.
> 
>   > (which requires to know the file's encoding, so we are back at the
>   > same problem).
> 
> If you're going to look at the contents of the file, you have to
> visit it, which means you'll know which encoding to use for that file.

The point is that our heuristics for detecting encoding is not
perfect, so it could fail.