On Monday, 31 July 2017 17:40:52 CEST Richard W.M. Jones wrote:
> +let unix_canonical_path path =
> +  let is_absolute = String.length path > 0 && path.[0] = '/' in
> +  let path = String.nsplit "/" path in
> +  let path = List.filter ((<>) "") path in
> +  (if is_absolute then "/" else "") ^ String.concat "/" path
> +
> +(* Note that we cannot use iconv here because inside the appliance
> + * all i18n databases are deleted.  For the same reason we cannot
> + * use functions like hivex_value_string, as they also use iconv
> + * internally.

Are you sure?  The iconv data are actually copied in the appliance
(brought by glibc packages, usually) -- see also commit
e73cd348c8a2786b5e9874dd1f96cf7bc36412f2 which included them again.

A quick test here (on a sample file) using the `iconv` command line
tool in virt-rescue worked, and correctly converted the encoding.

-- 
Pino Toscano

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs

Reply via email to