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 11
11
#include < ctype.h>
12
12
#include " AbstractMetaData.h"
13
13
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
14
22
15
23
/* *
16
24
* @defgroup metadata-id3 ID3
@@ -454,7 +462,7 @@ class MetaDataID3V2 : public MetaDataID3Base {
454
462
memset (result.data (), 0 , result.size ());
455
463
strncpy ((char *)result.data (), (char *) data+tag_pos+ID3FrameSize, l);
456
464
int checkLen = min (l, 10 );
457
- if (isAscii (checkLen)){
465
+ if (isAscii (checkLen) || AUDIOTOOLS_ID3_TAG_ALLOW_NONASCII ){
458
466
processnotifyAudioChange ();
459
467
} else {
460
468
LOGW (" TAG %s ignored" , tag);
@@ -607,4 +615,4 @@ class MetaDataID3 : public AbstractMetaData {
607
615
int filter = SELECT_ID3;
608
616
};
609
617
610
- } // namespace
618
+ } // namespace
You can’t perform that action at this time.
0 commit comments