Ticket #639 (assigned defect)

Opened 7 years ago

Last modified 6 years ago

[DEPENS] moto-sync scrambles event descriptions and locations

Reported by: qratz Owned by: andrewb
Priority: normal Milestone:
Component: Plugin: moto Version: 0.38
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[1]) 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.

Change History

comment:1 Changed 7 years ago by andrewb

  • Status changed from new to assigned

Bugger. Changing those fields to ASCII was the only way to get them to work with my L7.

I guess adding a configuration flag that says what the phone model is, and tracking the different quirks of all the different models is the only way to handle all these problems. That's a real pain :(

Thanks for the report... I'll think about how to handle this and keep it open until then.

comment:2 Changed 6 years ago by tuju

  • Milestone changed from 0.40 to 0.42

comment:3 Changed 6 years ago by tuju

  • Version changed from 0.34 to 0.38
  • Summary changed from moto-sync scrambles event descriptions and locations to [DEPENS] moto-sync scrambles event descriptions and locations

This depends on python-api which is broken.

Note: See TracTickets for help on using tickets.