Bug 90635 - ID3v2 "Unicode only when necessary" policy
Summary: ID3v2 "Unicode only when necessary" policy
Status: RESOLVED FIXED
Alias: None
Product: taglib
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Scott Wheeler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-01 23:25 UTC by Ilya Konstantinov
Modified: 2008-01-30 20:51 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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