eyeD3 crashes when genre is assigned a non pure ascii string

Bug #894388 reported by Pierre Fischer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
eyed3 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Every time you try to launch eyeD3 with a parameter of the option "-G" which is not a pure ascii string, you get a crash.

For instance :
<eyeD3 -G "Hello" file> works perfectly
but
<eyeD3 -G "Bébé" file> makes eyeD3 crash!

The problem seems to be in the method called parse of the class Genre. This method may have a string asa parameter. This string can be encoded different ways depending on where it comes from : either according to the encoding scheme of the tag being read from a file, or according to the LOCALE when it is provided as the parameter of the -G option. The parse method needs a utf-8 encoded string and tries to encode its parameter accordingly. This causes an automatic decode operation using ascii as the default encoding scheme : if the string contains character values not in the ascii character set, the program crashes!!

May be it would be better if the parameter of parse could be provided as a unicode object. This object should be built by the
caller using a decode operation with the appropriate encoding scheme at the time this scheme is known.... That's just a suggestion..

Additional information :
Tests made under Ubuntu 11.04 with the following package configuration :
eyed3:
  Installé : 0.6.17-1build1
  Candidat : 0.6.17-1build1
 Table de version :
 *** 0.6.17-1build1 0
        500 http://fr.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        100 /var/lib/dpkg/status
python-eyed3:
  Installé : 0.6.17-1build1
  Candidat : 0.6.17-1build1
 Table de version :
 *** 0.6.17-1build1 0
        500 http://fr.archive.ubuntu.com/ubuntu/ natty/main i386 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Alexandre Detiste (alexandre-detiste) wrote :

please try again with the last version that uses python3

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.