/* Returns: The converted string, or NULL on an error.  */
gchar* g_filename_to_utf8(const gchar *opsysstring, gssize len, gsize *bytes_read, gsize *bytes_written, GError **error)
/* Returns: The converted string, or NULL on an error.  */
gchar* g_filename_to_utf8(const gchar *opsysstring, gssize len, gsize *bytes_read, gsize *bytes_written, GError **error)
{
  const gchar *charset;
  g_return_val_if_fail (opsysstring != NULL, NULL);
  if (get_filename_charset (&charset))
    return strdup_len (opsysstring, len, bytes_read, bytes_written, error);
  else
    return g_convert (opsysstring, len, 
		      "UTF-8", charset, bytes_read, bytes_written, error);
}