-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The slash (/
) characters in tags are not correctly parsed
#103
Comments
After seeing these: I understand the issue better now. But still I think assuming the slash At least, I think the null/slash substitute definitely should not apply for all text fields, for example album name and track name. And |
ID3 has support for split values in text frames. In v2.2 and v2.3 the separator is a slash while in v2.4 it is a null byte. I intended the library to have a uniform ID3v2.4 interface, so everything that it reads is normalized to use null bytes. But I must admit that this leaves much to desire... Splitting happens at a very low level, just after decoding at It might be worth considering making the split functions of |
This is not entirely correct. The ID3v2.2.0 and ID3v2.3.0 specs only mention that certain text frames may contain multiple values, not all of them. This library currently assumes that the slash always indicates multiple values for these versions. TIn some cases, replacing the slash with a null bytes leads to the opposite of what was originally intended: Instead of achieving a uniform interface, users of this library have to implement custom workarounds for different tag versions. One example is the
For an ID3v2.4 tag, this works... $ cargo run --example id3info -- testdata/picard-2.12.3-id3v23-utf16.id3
# ID3 ID3v2.3 - 32 frames
...
TRCK="1/8"
... ... but for an ID3v2.3 tag, the value is wrongly parsed as multi-values: $ cargo run --example id3info -- testdata/picard-2.12.3-id3v24-utf8.id3
# ID3 ID3v2.4 - 33 frames
...
TRCK="1\08"
... I opened #146 to fix this. |
Looks like slash characters in tags are not parsed correctly by rust-id3 and are converted to null terminator character.
Some examples are:
Alan Walker, Au/Ra, Tomine Harket
=>"Alan Walker, Au\0Ra, Tomine Harket"
Derek Duke/Russell Brower
=>"Derek Duke\0Russell Brower"
Misty Mountains (In Dwarvish/Khuzdul)
=>"Misty Mountains (In Dwarvish\0Khuzdul)"
EDIT: Update example file. I'm not quite sure yet but it seems that the issue only happens in ID3 v2.3 version.
test.zip
The text was updated successfully, but these errors were encountered: