Bug#466107: dir2ogg: fails to convert files with non-ascii character in tags

2008-03-16 Thread Niv Sardi

This doesn't seem to be the right fix, I'm hitting the exact same issue
with WMA unicode tags, the right issue seems to be sanitazing the
element before the call to str(), I won't pretend to have a clue about
python, but using unicode() instead of str() fixes the problem for me.

Cheers,
-- 
Niv Sardi



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#466107: dir2ogg: fails to convert files with non-ascii character in tags

2008-03-16 Thread Julian Andres Klode
Niv Sardi wrote:
 This doesn't seem to be the right fix, I'm hitting the exact same issue
 with WMA unicode tags, the right issue seems to be sanitazing the
 element before the call to str(), I won't pretend to have a clue about
 python, but using unicode() instead of str() fixes the problem for me.
 
 Cheers,

This patch is for FLAC only. It's just a special hack for FLAC, which disables
all tag checks, as FLAC uses Vorbis tags.

I will release a new patch soon, which should fix support for most files, as
long as they use unicode tags.

-- 
Julian Andres Klode, Fellow of the Free Software Foundation Europe
 Debian Maintainer | Developer | Ubuntu Member

try Debian: http://www.debian.org/ | my site: http://jak-linux.org/
jabber: [EMAIL PROTECTED] | IRC: juliank (FreeNode, OFTC)
languages: German  | English



signature.asc
Description: OpenPGP digital signature


Bug#466107: dir2ogg: fails to convert files with non-ascii character in tags

2008-02-16 Thread Arnaud Guiton
Package: dir2ogg
Version: 0.11.1-1
Severity: important

Hi,

dir2ogg crashes when converting a file containing non-ascii characters
in its tags.
At least with flac, I got :

--
Traceback (most recent call last):
  File /usr/bin/dir2ogg, line 592, in ?
main()
  File /usr/bin/dir2ogg, line 587, in main
Convert(filename, conf)
  File /usr/bin/dir2ogg, line 303, in __init__
getattr(self, 'grab_%s_tags' % ext)()
  File /usr/bin/dir2ogg, line 260, in grab_flac_tags
self.grab_common(FLAC)
  File /usr/bin/dir2ogg, line 183, in grab_common
val = [str(i) for i in val]
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in
position 8: ordinal not in range(128)
--

According to a post on debian-mentors this issue should have been fixed
in 0.11 by using mutagen but it does not seem to be the case :-(

Did I miss something here or is the bug still around ?


Cheers,

-- 
Arnaud


signature.asc
Description: Digital signature


Bug#466107: dir2ogg: fails to convert files with non-ascii character in tags

2008-02-16 Thread Julian Andres Klode
tag 466107 pending
thanks

Arnaud Guiton wrote:
 Package: dir2ogg
 Version: 0.11.1-1
 Severity: important
 
 Hi,
 
 dir2ogg crashes when converting a file containing non-ascii characters
 in its tags.
Thank you for reporting this bug. Please try the attached patch. If it
works, I will release a new version in less than 24 hours.

This patch modifies dir2ogg to not try to convert FLAC tags to Ogg tags,
which is useless, because both use the same format.

Please note that this bug just fixes the FLAC problem you reported. MP4 and
WMA may still be affected by this bug. MP3 should not be affected.


 At least with flac, I got :
 
 --
 Traceback (most recent call last):
   File /usr/bin/dir2ogg, line 592, in ?
 main()
   File /usr/bin/dir2ogg, line 587, in main
 Convert(filename, conf)
   File /usr/bin/dir2ogg, line 303, in __init__
 getattr(self, 'grab_%s_tags' % ext)()
   File /usr/bin/dir2ogg, line 260, in grab_flac_tags
 self.grab_common(FLAC)
   File /usr/bin/dir2ogg, line 183, in grab_common
 val = [str(i) for i in val]
 UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in
 position 8: ordinal not in range(128)
 --
 
 According to a post on debian-mentors this issue should have been fixed
 in 0.11 by using mutagen but it does not seem to be the case :-(
 
 Did I miss something here or is the bug still around ?
 
 
 Cheers,
 


-- 
Julian Andres Klode, Fellow of the Free Software Foundation Europe
 Ubuntu Member | Debian Maintainer | Developer

try Ubuntu: http://www.ubuntu.com/ | my site: http://jak-linux.org/
 mail: [EMAIL PROTECTED]  | IRC: juliank
languages: German  | English
=== modified file 'dir2ogg'
--- dir2ogg	2007-12-15 21:50:57 +
+++ dir2ogg	2008-02-16 21:10:19 +
@@ -177,6 +177,8 @@
 key = convert and (key in convert and convert[key] or key) or key
 if not key in self.accept:
continue
+if not convert: # Hack for FLAC, which uses Vorbis tags
+pass
 elif hasattr(val, 'text'):
 val = val.text
 elif isinstance(val, list):



signature.asc
Description: OpenPGP digital signature


Bug#466107: dir2ogg: fails to convert files with non-ascii character in tags

2008-02-16 Thread Arnaud Guiton
Julian wrote:

 Thank you for reporting this bug. Please try the attached patch. If it
 works, I will release a new version in less than 24 hours.

The patch does indeed fix the problem.
I tested it with a few FLAC files which triggered the error before and
they are now being converted flawlessly.

Thanks for the (very) quick fix!

Cheers,

-- 
Arnaud


signature.asc
Description: Digital signature