brasslock / rubyripper

Automatically exported from code.google.com/p/rubyripper
1 stars 0 forks source link

UTF-8 encoding crashes ripping #565

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1) Please describe the steps to reproduce the situation:
Insert a CD.
Start rrip_gui
Insert a unicode character in the disc/track info.
Click "Rip cd now!"

2) What is the expected output? What do you see instead?
Expected rubyripper to start ripping, but instead it crashed. Output:
/usr/lib/ruby/vendor_ruby/2.0.0/rr_lib.rb:1659:in `gsub!': incompatible 
encoding regexp match (UTF-8 regexp with ASCII-8BIT string) 
(Encoding::CompatibilityError)
    from /usr/lib/ruby/vendor_ruby/2.0.0/rr_lib.rb:1659:in `allFilter'
    from /usr/lib/ruby/vendor_ruby/2.0.0/rr_lib.rb:1636:in `tagFilter'
    from /usr/lib/ruby/vendor_ruby/2.0.0/rr_lib.rb:1594:in `setMetadata'
    from /usr/lib/ruby/vendor_ruby/2.0.0/rr_lib.rb:1479:in `attemptDirCreation'
    from /usr/lib/ruby/vendor_ruby/2.0.0/rr_lib.rb:1685:in `overwriteDir'
    from /usr/lib/ruby/vendor_ruby/2.0.0/rr_lib.rb:2661:in `overwriteDir'
    from /usr/bin/rrip_cli:428:in `dir_exists'
    from /usr/bin/rrip_cli:447:in `update'
    from /usr/bin/rrip_cli:414:in `prepareRip'
    from /usr/bin/rrip_cli:331:in `showFreedbOptions'
    from /usr/bin/rrip_cli:305:in `showFreedb'
    from /usr/bin/rrip_cli:265:in `handleFreedb'
    from /usr/bin/rrip_cli:244:in `get_cd_info'
    from /usr/bin/rrip_cli:47:in `initialize'
    from /usr/bin/rrip_cli:486:in `new'
    from /usr/bin/rrip_cli:486:in `<main>'

3) What version of rubyripper are you using? On what operating system? The
gtk2 of commandline interface?
Version 0.6.2 on an up to date Arch Linux install. Same problem using both gtk 
and cli interface. Ruby version installed is 2.0.0.

4) Is this not already fixed with the latest & greatest code? See for
instructions the Source tab above.
Nope. Tried the latest master git version.

5) Does the problem happen with all discs? If not, please attach
the output of cdparanoia -Q with a disc that gives trouble.
Whenever you have a unicode character.

6) Please explain why this change is important for you. Also, how many
users would benefit from this change?
It would be easier to rip my CD's when the program doesn't crash because of a 
character.

I actually managed to get it working. I read issue 369 and by reversing the 
patch 
https://code.google.com/p/rubyripper/issues/attachmentText?id=369&aid=3898254256
766605063&name=0002-Force-binary-substitution-of-quotes.patch&token=5BFxrPP_DVek
Dz30FXO7amymc7g%3A1366999916784 it won't crash anymore.

Original issue reported on code.google.com by mbv...@gmail.com on 26 Apr 2013 at 7:57

GoogleCodeExporter commented 9 years ago
Fixed with commit:
https://code.google.com/p/rubyripper/source/detail?r=a59a5a350efbe7257076cde81fb
0e1927c69a2e6

Original comment by boukewou...@gmail.com on 9 May 2013 at 11:00