After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 676423 - not showing correct name of removable device
not showing correct name of removable device
Status: RESOLVED NOTGNOME
Product: gvfs
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2012-05-20 14:35 UTC by William Jon McCann
Modified: 2012-06-27 21:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (28.31 KB, image/png)
2012-05-20 14:35 UTC, William Jon McCann
Details

Description William Jon McCann 2012-05-20 14:35:42 UTC
Created attachment 214493 [details]
screenshot

As you can see from the attachment, we're not showing the correct name of the removable device. It is missing an "'".
Comment 1 William Jon McCann 2012-06-25 20:07:02 UTC
Cosimo and I dug into this a bit. It seems that libimobiledevice is stripping out the UTF character here.

http://cgit.sukimashita.com/libimobiledevice.git/tree/src/property_list_service.c#n251

I added:
printf("Converting %x to %x\n", content[bytes] & 0xff, 0x20);

and got:
Converting e2 to 20
Converting 80 to 20
Converting 99 to 20
Jon McCann   s iPhone

When I ran: ideviceinfo --key DeviceName

e2 80 99 is:
http://www.fileformat.info/info/unicode/char/2019/index.htm
Comment 2 William Jon McCann 2012-06-25 20:08:57 UTC
Commenting out the code in question seems to work. It gives me:
Jon McCann’s iPhone
Comment 3 William Jon McCann 2012-06-25 20:29:05 UTC
Seems the problem was introduced in:
http://cgit.sukimashita.com/libimobiledevice.git/commit/?id=abfdd2d2c2a0ba4236d90fba1dffe50e99ae5829

The original code was:
http://cgit.sukimashita.com/libimobiledevice.git/commit/?id=9a380d23e5c45c30509631401a35a71414377656

Which according to teuf was "made because we were getting 0x00 in the middle of an xml document, which caused xml parsing to stop prematurely."
Comment 5 Bastien Nocera 2012-06-27 21:45:27 UTC
Upstream bug in libimobiledevice is fixed, nothing for us to do further here.