[flac-dev] Metaflac UTF-8 fixes
Janne Hyvärinen
cse at sci.fi
Wed Apr 24 06:58:19 PDT 2013
On 24.4.2013 15:42, Erik de Castro Lopo wrote:
> Janne Hyvärinen wrote:
>
>> +#define PPR if(filename) if(raw) printf("%s:",filename); else flac_printf("%s:",filename);
> Are you sure about that line?
>
> GCC complains about an ambiguous 'else'. It definitely needs some
> curly braces somewhere there to make the intend explicit.
>
So it seems, I didn't expect any issues so I didn't test with mingw.
MSVC accepted things fine.
Changing it to #define PPR if(filename) { if(raw) {
printf("%s:",filename); } else { flac_printf("%s:",filename); } }
makes GCC happy.
The extra "if (raw)" check is there so command like "metaflac
--no-utf8-convert --list *.flac > file.txt" gives nice UTF-8 encoded
text file where both filenames and tags are encoded properly.
More information about the flac-dev
mailing list