[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#23750: 25.0.95; bug in url-retrieve or json.el
From: |
Eli Zaretskii |
Subject: |
Re: bug#23750: 25.0.95; bug in url-retrieve or json.el |
Date: |
Wed, 30 Nov 2016 17:06:11 +0200 |
> From: Philipp Stephani <address@hidden>
> Date: Tue, 29 Nov 2016 23:09:57 +0000
> Cc: address@hidden, address@hidden, address@hidden
>
> > json-encode returns a multibyte string.
>
> Any idea why?
>
> Because (symbol-name 'false) returns a multibyte string. I guess the ultimate
> reason is that the reader always
> creates multibyte strings for symbol names.
I'm not sure I understand how symbol-name comes into play here. Can
you help me understand this?
> Is it again that 'concat' misfeature, when one of the
> strings is pure-ASCII, but happens to be multibyte?
>
> Why is it a misfeature?
Because a pure-ASCII string doesn't need to be multibyte, it's only
becomes that by accident. The net results is that this misfeature
gets in the way when you want to produce a unibyte string by
concatenating an encoded string and some ASCII text.
> I'd expect a concatenation of multibyte and unibyte strings to either
> implicitly upgrade
> to as multibyte string (as in Python 2) or raise a signal (as in Python 3).
But when all the strings are either unibyte or pure-ASCII, we could
produce a unibyte string without losing anything.
- Re: bug#23750: 25.0.95; bug in url-retrieve or json.el, (continued)
- Re: bug#23750: 25.0.95; bug in url-retrieve or json.el, Lars Ingebrigtsen, 2016/11/30
- Re: bug#23750: 25.0.95; bug in url-retrieve or json.el, Eli Zaretskii, 2016/11/30
- Re: bug#23750: 25.0.95; bug in url-retrieve or json.el, Lars Ingebrigtsen, 2016/11/30
- Re: bug#23750: 25.0.95; bug in url-retrieve or json.el, Eli Zaretskii, 2016/11/30
- Re: bug#23750: 25.0.95; bug in url-retrieve or json.el, Philipp Stephani, 2016/11/30
- Re: bug#23750: 25.0.95; bug in url-retrieve or json.el, Eli Zaretskii, 2016/11/30
- Re: bug#23750: 25.0.95; bug in url-retrieve or json.el, Philipp Stephani, 2016/11/30
- Re: bug#23750: 25.0.95; bug in url-retrieve or json.el, Eli Zaretskii, 2016/11/30
- Re: bug#23750: 25.0.95; bug in url-retrieve or json.el, Eli Zaretskii, 2016/11/30
- Re: bug#23750: 25.0.95; bug in url-retrieve or json.el, Dmitry Gutov, 2016/11/30
- Re: bug#23750: 25.0.95; bug in url-retrieve or json.el,
Eli Zaretskii <=
- Re: bug#23750: 25.0.95; bug in url-retrieve or json.el, Stefan Monnier, 2016/11/30