[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Improve error reporting when serializing non-Unicode strings
From: |
Eli Zaretskii |
Subject: |
Re: [PATCH] Improve error reporting when serializing non-Unicode strings to JSON |
Date: |
Sat, 23 Dec 2017 10:28:29 +0200 |
> From: Philipp Stephani <address@hidden>
> Date: Fri, 22 Dec 2017 22:00:31 +0100
> Cc: Philipp Stephani <address@hidden>
>
> * admin/merge-gnulib (GNULIB_MODULES): Add unistr modules.
>
> * lib/Makefile.in (.c.o): Fix output file for files in subdirectories.
> (${DEPDIR}/unistr, unistr/u8-check.o): Create missing deps directory.
>
> * src/json.c (json_check_utf8): New helper function.
> (lisp_to_json_toplevel_1, lisp_to_json): Use it. To save a bit of
> time, check for invalid UTF-8 strings only after encountering an
> error, since Jansson already rejects them.
>
> * test/src/json-tests.el (json-serialize/invalid-unicode): Adapt
> expected error symbol.
I'm not sure I understand the need for this. Emacs never does that
anywhere else, it just converts the invalid bytes to a special
character set. An application that cares could then test for presence
of those bytes to see if anything like that happened. What am I
missing?
- [PATCH] Improve error reporting when serializing non-Unicode strings to JSON, Philipp Stephani, 2017/12/22
- Re: [PATCH] Improve error reporting when serializing non-Unicode strings to JSON,
Eli Zaretskii <=
- Re: [PATCH] Improve error reporting when serializing non-Unicode strings to JSON, Philipp Stephani, 2017/12/23
- Re: [PATCH] Improve error reporting when serializing non-Unicode strings to JSON, Eli Zaretskii, 2017/12/23
- Re: [PATCH] Improve error reporting when serializing non-Unicode strings to JSON, Philipp Stephani, 2017/12/23
- Re: [PATCH] Improve error reporting when serializing non-Unicode strings to JSON, Eli Zaretskii, 2017/12/23
- Re: [PATCH] Improve error reporting when serializing non-Unicode strings to JSON, Eli Zaretskii, 2017/12/23
- Re: [PATCH] Improve error reporting when serializing non-Unicode strings to JSON, Philipp Stephani, 2017/12/23
- Re: [PATCH] Improve error reporting when serializing non-Unicode strings to JSON, Philipp Stephani, 2017/12/23
- Re: [PATCH] Improve error reporting when serializing non-Unicode strings to JSON, Eli Zaretskii, 2017/12/23
- Re: [PATCH] Improve error reporting when serializing non-Unicode strings to JSON, Philipp Stephani, 2017/12/23
- Re: [PATCH] Improve error reporting when serializing non-Unicode strings to JSON, Eli Zaretskii, 2017/12/23