base: Add JSON string non-ASCII escaping options

- Add HEIM_JSON_F_ESCAPE_NON_ASCII to indicate that non-ASCII must be
   escaped as \uXXXX.

 - Add HEIM_JSON_F_NO_ESCAPE_NON_ASCII to force non-escaping of BMP
   codepoints.

 - If the locale's codeset is not UTF-8 and
   HEIM_JSON_F_NO_ESCAPE_NON_ASCII is not set, then set
   HEIM_JSON_F_ESCAPE_NON_ASCII.
This commit is contained in:
Nicolas Williams
2022-10-02 22:43:20 -05:00
parent 03f06b9472
commit 8364bdd8f3
5 changed files with 146 additions and 12 deletions

View File

@@ -148,6 +148,7 @@ HEIMDAL_BASE_1.0 {
heim_json_create_with_bytes;
heim_json_eq;
heim_load_plugins;
heim_locale_is_utf8;
heim_log;
heim_log_msg;
_heim_make_permanent;