Ticket #639 (assigned defect)
[DEPENS] moto-sync scrambles event descriptions and locations
|Reported by:||qratz||Owned by:||andrewb|
|Severity:||major||Keywords:||moto-sync motorola encoding utf16|
As the summary says, the current HEAD of moto-sync scrambles event descriptions and event locations. There seems to be a problem with the way moto-sync writes stores events on the phone. moto-sync's AT-Command passes the event summaries in a hexadecimal encoding, while the desciptions and locations (basically all other strings) are passed as quoted strings. It seems like my phone (v3xx) is not capable of handling these two variants of strings and interpretes all strings as if they were hex encoded. The responsible lines for this are 941-943 in motosync.py:
# HACK: only the name of the event (data) should be unicode for n in range(2, len(data)): if type(data[n]) == types.UnicodeType: data[n] = data[n].encode('ascii')
Looks like there is a reason why, the other fields are not encoded, but i don't know why. After removing the for-loop everything worked flawlessly. So far i've extensivley tested adding and removing events as well as modifying various fields of events (syncing against file-sync). And everything works fine. All issues from ticket 523 seem to be fixed.