search for: safe_print_string_attribute

Displaying 1 result from an estimated 1 matches for "safe_print_string_attribute".

2011 Sep 17
3
[PATCH 1/1] hivexml: Base64-encode non-printable data
..._printable = isprint (data[i]); + if (!is_printable) { + fprintf (stderr, "encoding_recommendation: Non-printable character found at data index %zu (c=%i)\n", i, data[i]); + break; + } + } + + return is_printable ? "none" : "base64"; +} + +static int +safe_print_string_attribute (hive_h *h, void *writer_v, const char *attr_name, const char *attr_encoding, const char *attr_data) +{ + int ret = 0; + char *encoding_to_use = NULL; + if (attr_name && attr_data && attr_encoding) { + xmlTextWriterPtr writer = (xmlTextWriterPtr) writer_v; + encoding_to_use...