Actually, the problem is almost certainly caused by non-matching charset in your table definition and your tables - your tables use latin1_spanish_ci but your actual data is something else (e.g. cp1250). I had a problem with that myself, had to fix that first. After I made sure the definition and the data match, the upgrade went just fine.
You can perform the fixing using a sequence of ALTER TABLE's:
1) Convert all character fields to either BLOB or BINARY without changing charset:
ALTER TABLE table MODIFY fieldname BLOB
2) Convert all character fields back to the correct type with correct charset:
ALTER TABLE table MODIFY fieldname VARCHAR(100) CHARACTER SET real_charset COLLATE real_collation NOT NULL
3) When all fields are converted, change the declaration of the table itself:
ALTER TABLE table CHARACTER SET real_charset COLLATE real_collation NOT NULL
Also, you may prefer to try it out on a copy of your data - just copy all tables to a new name using this sequence:
CREATE TABLE xyz_posts LIKE punbb_posts;
INSERT INTO xyz_posts SELECT * FROM punbb_posts;
Then just rewrite $db_prefix in your config.php from punbb_ to xyz_