From: Philipp Stephani <p.stephani2@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: `write-region' writes different bytes than passed to it?
Date: Sun, 23 Dec 2018 00:13:50 +0100 [thread overview]
Message-ID: <CAArVCkRufDHh6sNc+6mT6dYUQH9Qn7QOPQuxNhExdJ9--uSRbQ@mail.gmail.com> (raw)
In-Reply-To: <83a7lc0whm.fsf@gnu.org>
Am Di., 11. Dez. 2018 um 19:41 Uhr schrieb Eli Zaretskii <eliz@gnu.org>:
>
> > From: Stefan Monnier <monnier@iro.umontreal.ca>
> > Date: Tue, 11 Dec 2018 11:36:13 -0500
> >
> > > Yes, because "\xC1\xB2" just happens to be the internal multibyte
> > > representation of a raw-byte F2. Raw bytes are always converted to
> > > their single-byte values on output, regardless of the encoding you
> > > request.
> >
> > Maybe we shouldn't encode unibyte strings (under the assumption
> > that a unibyte string is already encoded: it's a sequence of bytes
> > rather than a sequence of chars).
>
> I'm not sure that single use case is important enough to change
> something that was working like that since Emacs 23. Who knows how
> many more important use cases this will break?
It's important for correctness and for actually describing what "encoding" does.
>
> This whole area is crawling with heuristics, whose only justification
> is that it does TRT in the vast majority of use cases.
>
Why should this be the right thing, what use case should it cover? Do
we expect users to explicitly put the byte sequences for the
(undocumented) internal encoding into unibyte strings? Shouldn't we
rather expect that users want to write unibyte strings as is, in all
cases?
next prev parent reply other threads:[~2018-12-22 23:13 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-11 12:30 `write-region' writes different bytes than passed to it? Philipp Stephani
2018-12-11 12:42 ` Philipp Stephani
2018-12-11 15:42 ` Eli Zaretskii
2018-12-11 15:41 ` Eli Zaretskii
2018-12-11 16:36 ` Stefan Monnier
2018-12-11 18:05 ` Eli Zaretskii
2018-12-11 19:47 ` Stefan Monnier
2018-12-22 23:16 ` Philipp Stephani
2018-12-22 23:13 ` Philipp Stephani [this message]
2018-12-22 22:59 ` Philipp Stephani
2018-12-22 22:58 ` Philipp Stephani
2018-12-23 15:20 ` Eli Zaretskii
2019-02-10 19:06 ` Philipp Stephani
2019-02-10 20:05 ` Eli Zaretskii
2018-12-24 4:27 ` Stefan Monnier
2019-02-10 19:15 ` Philipp Stephani
2019-02-10 20:13 ` Eli Zaretskii
2019-02-10 22:25 ` Stefan Monnier
2019-02-11 3:31 ` Eli Zaretskii
2019-02-11 14:05 ` Stefan Monnier
2019-02-11 16:37 ` Eli Zaretskii
2019-02-11 19:44 ` Stefan Monnier
2019-02-11 20:20 ` Eli Zaretskii
2019-02-11 22:06 ` Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAArVCkRufDHh6sNc+6mT6dYUQH9Qn7QOPQuxNhExdJ9--uSRbQ@mail.gmail.com \
--to=p.stephani2@gmail.com \
--cc=eliz@gnu.org \
--cc=help-gnu-emacs@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.