From: tomas@tuxteam.de
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: url-retrieve and encoding
Date: Sun, 11 Feb 2024 18:49:25 +0100 [thread overview]
Message-ID: <ZckIpaUKuR5OzDQf@tuxteam.de> (raw)
In-Reply-To: <ZcfTNDFb1SlYcC7R@tuxteam.de>
[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]
On Sat, Feb 10, 2024 at 08:49:08PM +0100, tomas@tuxteam.de wrote:
> On Sat, Feb 10, 2024 at 09:41:15PM +0200, Eli Zaretskii wrote:
[...]
> > Yes: decode-coding-region.
>
> Ahhh -- thanks a bunch for this one! How could I have missed it.
>
> > > (...) But that feels
> > > a bit... gross:
> >
> > Indeed. Why didn't you try decoding to begin with?
OK, now I can answer this question more precisely: actually, I'd
been there already and was coufused that the function did... nothing.
Now at least I know why: the buffer is unibyte. Its content /is/
utf-8. So if I set the last argument to nil (i.e. decode-in-place),
it replaces region with its utf8 byte sequences -- an identity
operation (unless there is erroneous UTF-8 around). If I give
it a multibyte buffer as last argument things look much better.
But then... I can do things "in buffer" by simply invoking
(toggle-enable-multibyte-characters t). At least, it seems to
work. But... is it a good idea?
Cheers & thanks
--
tomás
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2024-02-11 17:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-10 19:31 url-retrieve and encoding tomas
2024-02-10 19:41 ` Eli Zaretskii
2024-02-10 19:49 ` tomas
2024-02-11 17:49 ` tomas [this message]
2024-02-11 19:21 ` Eli Zaretskii
2024-02-12 5:30 ` tomas
2024-02-10 20:51 ` Tim Landscheidt
2024-02-11 6:30 ` tomas
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=ZckIpaUKuR5OzDQf@tuxteam.de \
--to=tomas@tuxteam.de \
--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.