[Top][All Lists]

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

bug#23750: 25.0.95; bug in url-retrieve or json.el

From: Dmitry Gutov
Subject: bug#23750: 25.0.95; bug in url-retrieve or json.el
Date: Mon, 20 Jun 2016 20:16:37 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2

On 06/20/2016 05:38 PM, Eli Zaretskii wrote:

Or just use concat,
and test the result with multibyte-string-p before sending.

Actually, here's a reason why we might prefer not to replace string-as/to-unibyte with multibyte-string-p: string-to-unibyte works fine if the string's contents only contain ASCII/8-bit characters, even if the string itself is multibyte. But multibyte-string-p returns nil for such strings anyway.

So doing like you suggest might make some (arguably not well-written) programs fail, which otherwise could function fine, provided they only operate on ASCII strings. And having a multibyte string with ASCII-only contents is fairly common when the string is produced with buffer-substring from a source code buffer.

While it might be good to discourage this kind of programming practice (that doesn't handle non-ASCII text properly), it seems like this would be better for master rather that the impending release.


reply via email to

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