Comments (8)
I made some fixes (including your suggestion) in 7c7eb57
But don't expect perfection if the input file is broken. For example, using your sample file the ID3v1 displays (mostly) correctly now, but the ID3v2 is broken because the tags are written in CP1251 but the tag is encoded as ISO-8859-1, which is wrong. You should retag your files with a multi-byte-encoding aware tagger (which should be pretty much anything) so that the ID3v2 tag is written as UTF-8 (or UTF-16 if you prefer).
from getid3.
Thanks for the fixes. But you know, there are tons of music encoded this way, I saw enough examples. What do you think, may be it's safe to expand this hack to id3-v2 tags as well? Cause using cp1251 in id3-v1 is kind of a violation too..
from getid3.
No, it will not be expanded to ID3v2.
ID3v1 doesn't have any mechanism for specifying character sets, and there was no alternative before ID3v2 was introduced, so the spec violation is unfortunate but understandable.
There is no excuse for using the wrong encoding in ID3v2.
from getid3.
I see, but usually users don't care about such matters (they just have their mp3s and want them ok) and I suppose we'll never find (and punch) people who produce such kind of id3-v2 tags... May be some switch then? Let's say... if (id3v1==true or crazyRussians==true) then {...check_1251...}
from getid3.
I'll leave that to the getID3 user if they want to second-guess the specified tag encoding and juggle things around with iconv or mb_convert_encoding.
from getid3.
Ok, one more question. Did you try the new version with that 3 test tracks? How many correct do you have? My friend says that with new version of getid3.php his project now does not recognize cyrillics. There was 1 track of 3 recognized before and 0/3 after. That's a bit strange, cause the old version plus that new regexp shows 3/3...
from getid3.
ID3v1 is automatically interpreted as Windows-1251
ID3v2 treated as ISO-8859-1 because that's the encoding the ID3v2 tag claims to be in.
The [comments] key will generally be returned with ID3v2 data overriding equivalent ID3v1 data.
If you have a lot of these broken files with CP1251 encoding you may want to access [tags][id3v1] instead of [comments].
from getid3.
Yeah, I guessed that may be id v2 overriding... It's clear now, thanks.
from getid3.
Related Issues (20)
- Bit rate for MP4 audio tracks HOT 3
- Reference getID3 from Google Apps Script HOT 1
- Purchasing a commercial license HOT 1
- `fread` length error in XMP HOT 2
- PHP Error as Severity: Notice Message: Undefined index: time_scale Filename: getid3/module.audio-video.quicktime.php Line Number: 335 HOT 1
- How to add Cover Image? HOT 1
- PHP Notice: Undefined index: data
- module.tag.id3v2 crashes PHP 8.2.12 if opcache enabled HOT 10
- fread(): Argument #2 ($length) must be greater than 0 HOT 1
- libxml_disable_entity_loader is deprecated HOT 3
- Garbage extracted from a RIFF tag in an AIFF file HOT 2
- Not work WRITE function in Windows 10/php7.4
- Write Synchronised lyric (SYLT)
- Unable to determine .gpx file HOT 5
- Deprecated: Implicit conversion from float ... to int loses precision HOT 7
- Mpeg duration error due to error in GOP parsing HOT 2
- Tag format "id3v2.3" is not allowed on "" files,
- Warning on PrintHexBytes function when $string is not a string. HOT 3
- Integrating into a Joomla 5 site
- Caught exception: Uninitialized string offset 0 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from getid3.