I have a database on a hosted provider that when created is set to the latin1_sweedish_ci collation. I have a script that I run to create the tables within that database and they all get created with "default charset=utf8 collate=utf8_unicode_ci"
When I use perl to put the data in, all I get are ?????? in the text for the special characters. If I run:
ALTER DATABASE DBBAME DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci
then using the same perl it all gets handled correctly. Why is it choosing the database collation over the table?
In the code, after opening the connection the following lines are executed:
SET NAMES 'utf8'
SET CHARACTER SET 'utf8'
Is there something about those statments that is causing the problem, or am is something else left out? This is something that is distrobuted on the web for hobbyists, who rarely know anything about the technical side. I'm trying to help figure out what's going on here so it will work across the board.
Thanks in advance,
Doug