NetworkManager/shared/nm-utils
Thomas Haller 52105f27df shared: add nm_utils_str_utf8safe_*() API to sanitize UTF-8 strings
Use C-style backslash escaping to sanitize non-UTF-8 strings.
The functions are compatible with glib's g_strcompress() and
g_strescape().

The difference is only that g_strescape() escapes all non-printable,
non ASCII character as well, while nm_utils_str_utf8safe_escape()
-- depending on the flags -- preserves valid UTF-8 sequence except
backslash.

The flags allow to optionally escape ASCII control characters and
all non-ASCII (valid UTF-8) characters. But the option to preserve
valid UTF-8 (non-ASCII) characters verbatim, is what distinguishes
from g_strescape().

(cherry picked from commit df6d27b33a)
2017-05-19 10:07:14 +02:00
..
gsystem-local-alloc.h shared: move shared files to subdirectory "shared/nm-utils/" 2016-06-16 10:45:53 +02:00
nm-glib.h all: use "static inline" keywords instead of "inline static" 2017-02-23 15:28:27 +01:00
nm-macros-internal.h libnm-core,shared: fix typo in '(allow-none)' annotation 2017-04-27 09:03:34 +02:00
nm-shared-utils.c shared: add nm_utils_str_utf8safe_*() API to sanitize UTF-8 strings 2017-05-19 10:07:14 +02:00
nm-shared-utils.h shared: add nm_utils_str_utf8safe_*() API to sanitize UTF-8 strings 2017-05-19 10:07:14 +02:00
nm-test-utils.h all: use "static inline" instead of "inline static" 2017-03-14 11:23:46 +01:00
nm-udev-utils.c libnm: don't cunescape \x00 encoding in nm_udev_utils_property_decode() 2017-05-19 10:07:14 +02:00
nm-udev-utils.h udev: add and use nm_udev_utils_property_decode() function 2017-03-22 12:41:06 +01:00
nm-vpn-editor-plugin-call.h shared: include "gsystem-local-alloc.h" from "nm-glib.h" 2016-06-16 10:45:54 +02:00
nm-vpn-plugin-macros.h shared: add nm_utils_syslog_coerce_from_nm() util 2016-09-19 15:35:33 +02:00
nm-vpn-plugin-utils.c shared: add "nm-utils/nm-vpn-plugin-utils.h" 2016-06-16 10:45:54 +02:00
nm-vpn-plugin-utils.h shared: add "nm-utils/nm-vpn-plugin-utils.h" 2016-06-16 10:45:54 +02:00
unaligned.h shared: add unaligned.h 2016-10-14 11:16:13 +02:00