strips apostrophe from iphone name
Reported by Jon McCann | June 25th, 2012 @ 08:46 PM
ideviceinfo --key DeviceName
returns: Jon McCann s iPhone
instead of: Jon McCann’s iPhone
Seems to be a result of http://cgit.sukimashita.com/libimobiledevice.git/commit/?id=abfdd2d...
Teuf proposed:
- if ((content[bytes] < 0x20) && (content[bytes] !=
0x09) && (content[bytes] != 0x0a) &&
(content[bytes] != 0x0d)) + if ((content[bytes] >= 0) &&
(content[bytes] < 0x20) && (content[bytes] != 0x09)
&& (content[bytes] != 0x0a) && (content[bytes] !=
0x0d))
Which seems to help.
Comments and changes to this ticket
-
teuf June 25th, 2012 @ 08:51 PM
'content' is declared as char content[] so if char is signed, all characters with the high bit set will be negative so they will be < 0x20. This means the code will strip all non-ASCII (multi-byte) UTF-8 characters and replace them with spaces.
-
Nikias Bassen June 25th, 2012 @ 10:17 PM
- State changed from new to resolved
- Assigned user set to Nikias Bassen
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A project around supporting the iPhone in Linux.
See http://libimobiledevice.org