diff --git a/src/configfile.c b/src/configfile.c index 51307eab..61da71f4 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -112,6 +112,7 @@ CONFIGELEMENT config_elements[] = { { 1,1,0,CONFIG_TYPE_STRING,"servername",(void*)&config.servername,config_emit_string }, { 1,0,0,CONFIG_TYPE_INT,"rescan_interval",(void*)&config.rescan_interval,config_emit_int }, { 1,0,0,CONFIG_TYPE_INT,"always_scan",(void*)&config.always_scan,config_emit_int }, + { 1,0,0,CONFIG_TYPE_INT,"latin1_tags",(void*)&config.latin1_tags,config_emit_int }, { 1,0,0,CONFIG_TYPE_INT,"process_m3u",(void*)&config.process_m3u,config_emit_int }, { 1,0,0,CONFIG_TYPE_INT,"scan_type",(void*)&config.scan_type,config_emit_int }, { 1,0,0,CONFIG_TYPE_INT,"compress",(void*)&config.compress,config_emit_int }, @@ -274,6 +275,7 @@ int config_read(char *file) { config.process_m3u=0; config.scan_type=0; config.compress=0; + config.latin1_tags=0; /* DWB: use alloced space so it can be freed without errors */ config.extensions=strdup(".mp3"); diff --git a/src/daapd.h b/src/daapd.h index 26314f1a..cc6e5428 100644 --- a/src/daapd.h +++ b/src/daapd.h @@ -56,6 +56,7 @@ typedef struct tag_config { int scan_type; /**< How hard to search mp3 files. see scan_get_mp3fileinfo() */ int compress; /**< Should we compress? */ int pid; /**< pid that will accept INT to terminate */ + int latin1_tags; /**< interpret all tags as latin1 rather than utf8 */ char *adminpassword; /**< Password to web management pages */ char *readpassword; /**< iTunes password */ char *mp3dir; /**< root directory of the mp3 files */ diff --git a/src/mp3-scanner.c b/src/mp3-scanner.c index 4fbd66f5..258aae49 100644 --- a/src/mp3-scanner.c +++ b/src/mp3-scanner.c @@ -800,7 +800,11 @@ int scan_get_mp3tags(char *file, MP3FILE *pmp3) { if(native_text) { have_utf8=1; - utf8_text=id3_ucs4_utf8duplicate(native_text); + if(config.latin1_tags) { + utf8_text=id3_ucs4_latin1duplicate(native_text); + } else { + utf8_text=id3_ucs4_utf8duplicate(native_text); + } MEMNOTIFY(utf8_text); if(!strcmp(pid3frame->id,"TIT2")) { /* Title */