Public bug reported:

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

** Affects: eyed3 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/894388

Title:
  eyeD3 crashes  when genre is assigned a non pure  ascii string

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/eyed3/+bug/894388/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to