Re: sed error message reports byte position instead of char position when program contains UTF-8

Eli Zaretskii <[email protected]>
Newsgroups gmane.comp.gnu.utils.bugs
Message-ID <[email protected]>
> From: [email protected] (Paul Jarc)
> Date: Wed, 15 May 2013 14:36:47 -0400
> 
> Eli Zaretskii <[email protected]> wrote:
> > Options to the 's' command are all pure-ASCII single-byte characters,
> > so Sed is correct in this case, I think.
> 
> I don't think so.  The example doesn't violate that rule.  The unknown
> option is "/".  But due to a multibyte character in the pattern, the
> offset is either miscalculated (should say "11" instead of "12") or
> badly described (should say "byte" instead of "char").

"Byte" is the only viable alternative, but that leaves the burden of
counting bytes on the user.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.