NetworkManager/shared
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
..
nm-utils shared: add nm_utils_str_utf8safe_*() API to sanitize UTF-8 strings 2017-05-19 10:07:14 +02:00
nm-common-macros.h all: modify line separator comments to be 80 chars wide 2016-10-03 12:01:15 +02:00
nm-dbus-compat.h build: rename directory "include" to "shared" 2015-12-24 11:42:37 +01:00
nm-default.h build: disable type checks in G_TYPE_CHECK_INSTANCE_CAST() macros (bgo#771120) 2016-09-12 13:53:34 +02:00
nm-dispatcher-api.h build: cleanup src/Makefile.am 2016-08-11 11:54:18 +02:00
nm-setting-metadata.c shared: move NMSetting8021xSchemeVtable to "shared/nm-setting-metadata.h" 2017-02-17 19:52:13 +01:00
nm-setting-metadata.h shared: move NMSetting8021xSchemeVtable to "shared/nm-setting-metadata.h" 2017-02-17 19:52:13 +01:00
nm-test-libnm-utils.h shared: move shared files to subdirectory "shared/nm-utils/" 2016-06-16 10:45:53 +02:00
nm-test-utils-impl.c build: allow specifying the python interpreter for building 2016-12-14 19:00:42 +01:00
nm-version-macros.h.in release: bump version to 1.7.0 (development) 2017-01-18 18:37:06 +01:00