that's good for scratching our own spanish-speaking developer itches, but I think it deserves to be more robust...
what do you think about chardet?