From: Eli Zaretskii <eliz@gnu.org>
To: handa <handa@gnu.org>
Cc: gregory@heytings.org, 46933@debbugs.gnu.org
Subject: bug#46933: Possible bugs in filepos-to-bufferpos / bufferpos-to-filepos
Date: Sun, 28 Mar 2021 17:51:35 +0300 [thread overview]
Message-ID: <83tuovmivc.fsf@gnu.org> (raw)
In-Reply-To: <87y2e7s65m.fsf@gnu.org> (message from handa on Sun, 28 Mar 2021 23:29:41 +0900)
> From: handa <handa@gnu.org>
> Cc: gregory@heytings.org, 46933@debbugs.gnu.org
> Date: Sun, 28 Mar 2021 23:29:41 +0900
>
> > In any case, the problem is not with encoding, the problem is with
> > decoding. Encoding doesn't have this problem because we always encode
> > more than enough (we use the value of BYTE as the count of
> > _characters_ to encode, so for ISO-2022 encoding it is usually much
> > more than needed). By contrast, when decoding, we decode exactly
> > BYTE+1 bytes, which then hits the problem if that offset is inside a
> > shift sequence.
>
> Then, that implementation should be changed.
>
> Any coding system can have :post-read-conversion and
> :pre-write-conversion functions, it is not guaranteed that encoded byte
> length is greater than the number of characters.
Agreed, but AFAICT, ISO-2022-JP doesn't have any of these attributes,
right?
next prev parent reply other threads:[~2021-03-28 14:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 21:21 bug#46933: Possible bugs in filepos-to-bufferpos / bufferpos-to-filepos Gregory Heytings
2021-03-21 15:27 ` Eli Zaretskii
2021-03-27 5:38 ` handa
2021-03-27 7:54 ` Eli Zaretskii
2021-03-27 13:23 ` handa
2021-03-27 13:54 ` Eli Zaretskii
2021-03-28 14:29 ` handa
2021-03-28 14:51 ` Eli Zaretskii [this message]
2021-04-01 15:14 ` handa
2021-04-01 15:25 ` Eli Zaretskii
2021-04-01 15:32 ` Eli Zaretskii
2021-04-03 16:12 ` handa
2022-06-20 0:59 ` Lars Ingebrigtsen
2022-06-20 11:52 ` Eli Zaretskii
2022-06-21 10:40 ` Lars Ingebrigtsen
2022-06-21 12:14 ` Eli Zaretskii
2022-06-22 4:17 ` Lars Ingebrigtsen
2022-06-22 13:11 ` Eli Zaretskii
2021-03-27 14:24 ` Gregory Heytings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83tuovmivc.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=46933@debbugs.gnu.org \
--cc=gregory@heytings.org \
--cc=handa@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).