1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-26 10:03:40 +03:00
Zbigniew Jędrzejewski-Szmek 3565e09594 basic/escape: merge utf8 and non-utf8 paths in cunescape_one
Not every byte sequence is valid utf8. We allow escaping of non-utf8
sequences in strings by using octal and hexadecimal escape sequences
(\123 and \0xAB) for bytes at or above 128. Users of cunescape_one
could infer whether such use occured when they received an answer
between 128 and 256 in *ret (a non-ascii one byte character). But this
is subtle and misleading: the comments were wrong, because ascii is a
subset of unicode, so c != 0 did not mean non-unicode, but rather
ascii-subset-of-unicode-or-raw-byte. This was all rather confusing, so
make the "single byte" condition explicit.

I'm not convinced that allowing non-utf8 sequences to be produced is
useful in all cases where we allow it (e.g. in config files), but that
behaviour is unchanged, just made more explicit.

This also fixes an (invalid) gcc warning about unitialized variable
(*ret_unicode) in callers of cunescape_one.
2016-01-18 15:20:32 -05:00
2015-07-06 17:47:38 +02:00
2016-01-11 13:55:48 +02:00
2016-01-12 12:14:50 +02:00
2015-08-31 18:12:37 +02:00
2016-01-11 19:39:59 +01:00
2015-11-23 12:32:59 +01:00
2015-06-03 00:22:53 +02:00
2016-01-11 19:39:59 +01:00
2014-06-04 15:41:10 -04:00
2015-07-27 20:15:34 +02:00

systemd - System and Service Manager

Build Status
Coverity Scan Status

Details

  • General information about systemd can be found in the systemd Wiki
  • Information about build requirements are provided in the README file
Description
Backports of patch from systemd git to stable distributions
Readme 226 MiB
Languages
C 89.4%
Python 5.8%
Shell 2.1%
Meson 1.3%
HTML 0.9%
Other 0.4%