Next: , Previous: , Up: Strings   [Contents][Index]

16.1.3 Strings with NUL characters

The GNU Coding Standards, section, specifies:

Utilities reading files should not drop NUL characters, or any other nonprinting characters.

When it is a requirement to store NUL characters in strings, a variant of the C strings is needed. Gnulib offers a “string descriptor” type for this purpose. See Handling strings with NUL characters.

All remarks regarding encodings and multibyte characters in the previous section apply to string descriptors as well.