From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Sun, 08 Oct 2017 23:14:18 +0000
> Cc: eggert@cs.= ucla.edu, emac= s-devel@gnu.org
>
> Jansson only accepts UTF-8 strings, and at least in our usage will als= o only hand out UTF-8 strings.
How can we be 100% sure of that?=C2=A0 We don't trust any other librari= es
with such high fidelity, we always decode any external data.We also trust glibc's malloc to never return over= lapping non-freed blocks, right? This "trust" isn't different= . Of course we can assume that libraries behave according to their specific= ation.=C2=A0<= div>
> It's totally OK to rely on this assumption since all code that'= ;s involved here is part of the Emacs core, so it can
> rely on implementation details.
That is in stark contrast with your usual coding style, which tends to
place checks and assertions where they are not always needed.
=C2=A0 Could
it be that you underestimate the damage that broken non-ASCII byte
stream can cause Emacs if inserted directly into a buffer or a string?
Doing so will usually cause Emacs die a horrible death quite soon,
because code that processes buffer or string text has no defenses
against such calamities.