Displaying 1 result from an estimated 1 matches for "cd_utf8_latin1".
2018 Feb 14
1
[PATCH] inspector: rpm summary and description may not be utf-8
...4-header-format
*/
/* The minimum header size that makes sense here is 24 bytes. Four
@@ -301,6 +302,66 @@ struct read_package_data {
struct guestfs_application2_list *apps;
};
+static char *
+to_utf8 (guestfs_h *g, char *input)
+{
+ iconv_t cd_utf8_utf8 = (iconv_t)(-1);
+ iconv_t cd_utf8_latin1 = (iconv_t)(-1);
+ size_t in_left, out_left, res;
+ char *in_ptr;
+ char *out_ptr;
+ char *output = NULL;
+ char *result = NULL;
+
+ cd_utf8_utf8 = iconv_open("UTF-8", "UTF-8");
+ if (cd_utf8_utf8 == (iconv_t)(-1)) {
+ perrorf(g, "No iconv UTF-8 encoding");
+...