Yes, you can use JavaScript to format your names before they get to ListMail. Indeed, it should use less CPU at mailing time as the capitalize function is now a good 10 lines to account for names like "O'Brian", and "McDonald".
Here's the new code:
function capitalize($name=NULL) {
if(empty($name)) return false;
$name = strtolower($name);
$names_array = explode('-',$name);
for ($i = 0; $i < count($names_array); $i++) {
if (strncmp($names_array[$i],'mc',2) == 0 || ereg('^[oO]\'[a-zA-Z]',$names_array[$i])) {
$names_array[$i][2] = strtoupper($names_array[$i][2]);
}
$names_array[$i] = ucfirst($names_array[$i]);
}
$name = implode('-',$names_array);
return ucwords($name);
}
If you do something like this in JavaScript I'd be interested in a copy. I could translate it too, perhaps for a future improvement to the signup form generator.
Regards!