Eli Za=
retskii <
eliz@gnu.org> schrieb am=
So., 8. Okt. 2017 um 20:42=C2=A0Uhr:
I don't think we can bypass decoding in this case; the reason why you
think it isn't needed is because you only tried that with valid UTF-8
encoded text.=C2=A0 We never rely on that elsewhere, AFAIK.
Jansson only accepts UTF-8 strings, and at least in ou=
r usage will also only hand out UTF-8 strings.
I'd rather not=
include coding steps: given their complexity, they are very slow and make =
the code much more complex than necessary. Since we only deal with UTF-8 st=
rings, and we can assume that Emacs strings are a superset of UTF-8 strings=
, we can completely avoid any coding operations.
It's totally=
OK to rely on this assumption since all code that's involved here is p=
art of the Emacs core, so it can rely on implementation details.