From a431fe8a8dfbbe121a30c66df0424be6351ae9ff Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 28 Jan 2020 20:44:28 +0300 Subject: Validate that values submitted to CI and submission services contain UTF-8 encoded graphic characters only --- bdep/utility.hxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'bdep/utility.hxx') diff --git a/bdep/utility.hxx b/bdep/utility.hxx index 3de1c32..7f464ad 100644 --- a/bdep/utility.hxx +++ b/bdep/utility.hxx @@ -303,6 +303,15 @@ namespace bdep scan_arguments (r, s); return r; } + + // Verify that a string is a valid UTF-8 byte sequence encoding only the + // graphic Unicode codepoints. Issue diagnostics (including a suggestion to + // use option opt, if specified) and fail if that's not the case. + // + void + validate_utf8_graphic (const string&, + const char* what, + const char* opt = nullptr); } #include -- cgit v1.1