[Top][All Lists]

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

Re: [PATCH] json-encode-char bug?

From: Takafumi Arakaki
Subject: Re: [PATCH] json-encode-char bug?
Date: Thu, 27 Sep 2012 19:32:58 +0200

On Thu, Sep 27, 2012 at 3:13 PM, Stefan Monnier
<address@hidden> wrote:
> Actually, ASCII only goes up to 127, so I've changed the 161 to 128
> (now that I think about it, ASCII 127 is DEL which isn't very printable
> either so maybe I should have replaced it with 127).

Thank you very much for the quick fix.  Indeed,
json.dumps(unichr(127)) returns '"\\u007f"' in Python, so I guess it's
better to change 128 to 127.

In browser, JSON.stringify(String.fromCharCode(127)) returns '""',
which is raw code I guess.  But
JSON.stringify(String.fromCharCode(160)) returns '" "', so maybe this
is my JS console's problem (node and google chrome) or they are
encoded at different stage.


PS: Sorry to send it twice to you, Stefan.  I meant to sent it to emacs-devel.

reply via email to

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