Bug 163101 - id3lib incorrectly writes UTF-16 strings
Summary: id3lib incorrectly writes UTF-16 strings
Alias: None
Product: Fedora
Classification: Fedora
Component: id3lib
Version: 4
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Dams
QA Contact: Fedora Extras Quality Assurance
URL: http://sourceforge.net/tracker/index....
Depends On:
TreeView+ depends on / blocked
Reported: 2005-07-12 21:34 UTC by Matt Dainty
Modified: 2017-07-01 04:34 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-07-16 11:12:02 UTC
Type: ---

Attachments (Terms of Use)
Patch to correct writing of UTF-16 tag values (565 bytes, patch)
2005-07-12 21:37 UTC, Matt Dainty
no flags Details | Diff

Description Matt Dainty 2005-07-12 21:34:56 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4

Description of problem:
When writing Unicode ID3v2 strings in UTF-16 format, id3lib can potentially write them incorrectly due to a bug in src/io_helpers.cpp.

The arithmetic is performed on signed character values rather than unsigned so in the case of some characters, they get written wrong.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Get MP3 track with ID3v2 tag containing UTF-16 encoded values, (Japanese works well), verify track appears okay in some music application.
2. Use id3tag to change some value, such as the track number.
3. Reload altered track in the same music application.

Actual Results:  UTF-16 encoded values have become garbage.

Expected Results:  Nothing, apart from the change made in step 2.

Additional info:

Comment 1 Matt Dainty 2005-07-12 21:37:36 UTC
Created attachment 116687 [details]
Patch to correct writing of UTF-16 tag values

This is a patch containing the fix as documented in the sourceforge URL and
seems to work here.

Comment 2 Michael Schwendt 2005-07-16 11:12:02 UTC
Thanks. id3lib-3.8.3-12.fc4 will fix this.

Note You need to log in before you can comment on or make changes to this bug.