File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/AudioTools/CoreAudio/AudioMetaData Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1111#include < ctype.h>
1212#include " AbstractMetaData.h"
1313
14+ /* *
15+ * An optional flag to disable the Non-ASCII character check on IDv3 metadata checks.
16+ * Set this to `true` if having issues parsing Unicode metatags in MP3 files.
17+ * Feature-flagged to prevent breaking changes to existing users. -akasaka/2025
18+ **/
19+ #ifndef AUDIOTOOLS_ID3_TAG_ALLOW_NONASCII
20+ #define AUDIOTOOLS_ID3_TAG_ALLOW_NONASCII false
21+ #endif
1422
1523/* *
1624 * @defgroup metadata-id3 ID3
@@ -454,7 +462,7 @@ class MetaDataID3V2 : public MetaDataID3Base {
454462 memset (result.data (), 0 , result.size ());
455463 strncpy ((char *)result.data (), (char *) data+tag_pos+ID3FrameSize, l);
456464 int checkLen = min (l, 10 );
457- if (isAscii (checkLen)){
465+ if (isAscii (checkLen) || AUDIOTOOLS_ID3_TAG_ALLOW_NONASCII ){
458466 processnotifyAudioChange ();
459467 } else {
460468 LOGW (" TAG %s ignored" , tag);
@@ -607,4 +615,4 @@ class MetaDataID3 : public AbstractMetaData {
607615 int filter = SELECT_ID3;
608616};
609617
610- } // namespace
618+ } // namespace
You can’t perform that action at this time.
0 commit comments