Ticket #558 (closed defect: fixed)

Opened 15 months ago

Last modified 13 months ago

mototool --backup produces invalid output

Reported by: felixmoeller Owned by: andrewb
Priority: normal Milestone:
Component: Plugin: moto Version: 0.22
Severity: normal Keywords:
Cc:

Description

Trying mototool more deeply today I found out that --backup generated entries like the following: +-49611xxxx",145,"Mxxxs",1,0,255,0,0,1,255,0,0,"",0,0,"","","","","","","",""

The problem is with --restore cannot restore the entry. I have to run sed -i 's/+-49/+49/g' to get further with restoring.

Attachments

motosync-charset.diff (7.8 KB) - added by felixmoeller 15 months ago.
This is a patch to port the characterset changes from trunk back to 0.2x

Change History

Changed 15 months ago by felixmoeller

Schulze-M+APY-nking and Gro+AN8-erichter broke the restore function too, but after deleteting the problematic characters, I could restore the phone.

Sadly all Umlauts ö, ß, ä, ü seem to be broken. ;)

Changed 15 months ago by felixmoeller

This seems to be caused by "strings.append('"%s"' % val.encode('utf7'))" in "def pack_backup(typestr, edata):" of mototool.

Andrew was this the motivation for changeset http://www.opensync.org/changeset/2053 ?

Changed 15 months ago by andrewb

  • status changed from new to assigned

Hi, yes the character encoding in the 0.2x version is very fragile. I never tested with extended characters, so I'm not too surprised it's broken. I suspect your immediate problem is the utf7, and you could possibly just change that to another character set, but there are other trickier bugs in that version of the backup format (like \n), so I would suggest if possible that you try the svn version of mototool and see if that works.

Changed 15 months ago by felixmoeller

This is a patch to port the characterset changes from trunk back to 0.2x

Changed 13 months ago by andrewb

  • status changed from assigned to closed
  • resolution set to fixed

I doubt we'll do another 0.2x release, but in any case I've applied your patch as r2732. Thanks.

Note: See TracTickets for help on using tickets.