Bug? Database collatin chosen over table?
Posted by: Doug Crabtree
Date: June 08, 2007 01:52PM

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

Options: ReplyQuote


Subject
Views
Written By
Posted
Bug? Database collatin chosen over table?
2966
June 08, 2007 01:52PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.