Subject: | "Unitialized" issue with get_mp3tag(), use_mp3_utf8(1) and unset genre |
I keep "catagorizing" my MP3s with no genre (''), which set_mp3tag() maps to 0xFF.
Read by get_mp3tag(), these give an undefined value for $info{'GENRE'} at first.
With use_mp3_utf8(1) && "perl -w", then get_mp3tag() chokes at line #453 passing this undefined value to Unicode::String::latin1() yielding a warning.
Proposed solutions:
1. add a genre '' with 0xFF as the array index;
2. insert test at line #451 setting $info{'GENRE'} to '' if it is undefined;
3. rewrite the loop at line #452: if the current value is undefined:
a) "next";
b) set the value to '' (hack: "Unicode::String::latin1($info{$key} || '')")
As I never had a big demand for genres, I'd prefer solution 3. a) but I cannot estimate the implications for the rest of the code.
I will probably report another Unicode bug around line #496 later today. (Unicode ist really great - just the transitions *suck*.)