[Spice-devel] [spice-gtk v1] file-xfer: Fix bad filename encoding
Victor Toso
victortoso at redhat.com
Thu Apr 13 08:29:13 UTC 2017
Hi,
On Wed, Apr 12, 2017 at 04:19:06PM +0200, Christophe Fergeau wrote:
> On Wed, Apr 12, 2017 at 03:55:04PM +0200, Victor Toso wrote:
> > I'm not specialist on possible problems but although ascii is compatible
> > with utf8 it might become a problem to not have a standard well defined
> > in the future although Marc-André said it should be UTF-8.
>
> If you mandate UTF-8 in the protocol, you probably cause a regression if
> your client has an iso8859-1 filename, and you dnd that to a VM where
> you also expect the iso8859-1 filename.
If we enforce utf-8 that would means converting twice, iso8859-1 to
utf-8 for the protocol and utf-8 to is8859-1 in the guest.
> In this day and age, this is just a corner case, but I'm not sure
> mandating UTF8 conversion of filenames before dnd'ing them is not
> going to cause issue either.
Yes, I understand that.
We could have a new metadata-key that says the encoding we are using ,
the guest agent could check that and use it to convert accordingly. This
only solves the utf8 to iso8859-1 example).
All in all, having a weird filename is not a major problem IMHO; The
main problem is not having the file transferred at all. I guess the
windows agent need some work to avoid that in the future.
This is just a proposal for something more consistent... I'm totally
fine to fix this a regression by 'reverting' the change to use
g_file_get_basename(), I'll send a v2 with that soon.
Cheers,
toso
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170413/8d07e205/attachment.sig>
More information about the Spice-devel
mailing list