Bug 90635

Summary: ID3v2 "Unicode only when necessary" policy
Product: [Frameworks and Libraries] taglib Reporter: Ilya Konstantinov <kde-bug-report>
Component: generalAssignee: Scott Wheeler <wheeler>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Ilya Konstantinov 2004-10-01 23:25:04 UTC
Version:           1.3 (using KDE Devel)

It would be handy if TagLib would offer, in addition to its current policy of choosing a single static encoding for rendering ID3v2 frames, a policy when Latin1 would be used for all Latin1-only text/comment frames (in attempt to keep best interoperatibility with broken ID3v2 applications *cough*Winamp*cough*) and use a given Unicode encoding (should be selectable) for texts containing non-Latin1 characters.

I found myself repeating this pattern over and over in applications to which I've added Unicode ID3v2 support, so this looks like a handy feature. What do you think?
Comment 1 Scott Wheeler 2004-10-29 17:33:09 UTC
Yeah, that's reasonable.  It won't be on by default or anything and would slow things down very slightly while writing (since it'd need to do a check to see if any of the characters were unicode), but other than that it shouldn't be too hard.  (Famous last words.)
Comment 2 Martin Zboƙil 2005-06-20 23:36:42 UTC
*** This bug has been confirmed by popular vote. ***
Comment 3 Scott Wheeler 2008-01-30 20:51:19 UTC
SVN commit 768857 by wheeler:

This causes TagLib to check to make sure that text values to-be-written as
ISO-8859-1 are in fact ISO-8859-1 values (assuming they were passed into TagLib
properly) and if not automatically switches those frames to UTF8.

FEATURE:90635
CCBUG:90635


 M  +8 -5      frames/attachedpictureframe.cpp  
 M  +10 -5     frames/commentsframe.cpp  
 M  +5 -3      frames/textidentificationframe.cpp  
 M  +10 -0     frames/textidentificationframe.h  
 M  +6 -3      frames/urllinkframe.cpp  
 M  +16 -1     id3v2frame.cpp  
 M  +10 -1     id3v2frame.h  
 M  +16 -10    id3v2framefactory.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=768857
Comment 4 Scott Wheeler 2008-01-30 20:51:20 UTC
SVN commit 768857 by wheeler:

This causes TagLib to check to make sure that text values to-be-written as
ISO-8859-1 are in fact ISO-8859-1 values (assuming they were passed into TagLib
properly) and if not automatically switches those frames to UTF8.

FEATURE:90635
CCBUG:90635


 M  +8 -5      frames/attachedpictureframe.cpp  
 M  +10 -5     frames/commentsframe.cpp  
 M  +5 -3      frames/textidentificationframe.cpp  
 M  +10 -0     frames/textidentificationframe.h  
 M  +6 -3      frames/urllinkframe.cpp  
 M  +16 -1     id3v2frame.cpp  
 M  +10 -1     id3v2frame.h  
 M  +16 -10    id3v2framefactory.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=768857