Ok, I finally got around to testing the fix to MakeLegalName that was
applied to CleanUp.pl, and it doesn't actually work for me.
I have perl 5.6.1, which I believe uses UTF-8 internally for all strings,
and mysql 3.23.49, which seems to be configured for latin1.
I have a (very small) number of artists that have accents of some kind in
their names. (e.g. bjork, Saint-Saens, Dvorak, etc.)
Anyway, in these case latin1 is not compatible with UTF-8, so the results
are "undefined" (ranging from a simple error message to a seg fault).
I quick fix for me has been to insert the line:
$str=~s/([\x80-\xFF])/chr(0xC0|ord($1)>>6).chr(0x80|ord($1)&0x3F)/eg;
into the top of MakeLegalName, which does a latin1->UTF8 conversion.
However, I'm worried that this:
a) wont work in general, as older versions of perl, dont use UTF8 and
newer versions of mysql probably will.
b) isn't pretty. Surely there is a better way to do this conversion.
c) The conversion should be done at some other point. I'd hoped that there
would be some way to convince DBI to do the conversions for us, but I
can't find any reference in the man page.
Any ideas?
Rob
--
______ _____ ______ _______ ______ _______
|_____/ | | |_____] |______ |_____/ |
| \_ |_____| |_____] |______ | \_ |
_ _ _______ ______ _______
|_____| |_____| |_____/ |
| | | | | \_ |
_______________________________________________
Obs-dev mailing list
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/obs-dev