[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Decoding URLs input

From: Eli Zaretskii
Subject: Re: Decoding URLs input
Date: Sun, 04 Jul 2021 07:22:25 +0300

> From: Yuri Khan <>
> Date: Sun, 4 Jul 2021 03:16:37 +0700
> I just fed it some percent-encoded sequences that I knew would result
> in invalid UTF-8 when decoded. If it were doing a full decode, I
> expected it to signal an error. It didn’t.

That's not a reliable sign that a function returns unibyte strings.
Most Emacs APIs that decode strings don't signal errors if they
encounter invalid sequences; instead, they decode those into raw
bytes.  The design principle is to support raw bytes in strings and
let the application deal with them if they are not expected.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]