diff options
author | Manuel Stoeckl <code@mstoeckl.com> | 2023-11-11 16:55:41 -0500 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2023-11-22 22:03:00 +0300 |
commit | a3d22dbe972770f84ae71f7080fb7bc676c2ba7a (patch) | |
tree | 5bff2c2790e2c34651ef787b255b31c4ecc53bcb /include | |
parent | 41494244dfa017eb6952f16ce8716988198c78ad (diff) |
xdg-toplevel: check that title provided actually is UTF-8
While the xdg-shell protocol requires this, it does not yet have
a dedicated error code for invalid titles; this commit makes
wlroots send a generic error instead.
Diffstat (limited to 'include')
-rw-r--r-- | include/util/utf8.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/util/utf8.h b/include/util/utf8.h new file mode 100644 index 00000000..4d5172c7 --- /dev/null +++ b/include/util/utf8.h @@ -0,0 +1,11 @@ +#ifndef UTIL_UTF8_H +#define UTIL_UTF8_H + +#include <stdbool.h> + +/** + * Return true if and only if the string is a valid UTF-8 sequence. + */ +bool is_utf8(const char *string); + +#endif |