Re: data in my database appear like (????????)
Posted by: Hamidreza Mz
Date: June 27, 2006 07:59AM

Hi!
This is my problem too! I was searching in web for resolving this naughty problem. I founded a web site recently and take my experimental php project to it.
my project works fine locally with mysql 4.1.9-max.
Hosting service mysql versin is 4.1.10 .
I am a php novice and this is my first application that is a simple register & login system. I set every thing on utf8; headers - html form ... etc.
mysql preparer query is: SET CHARACTER SET 'utf8'
I had to comment this instruction entirely in my project for the sake that users can register and login with a non-ascii username string (in my project e.g. it is

persian! ())
but this is an annoying workaround. Each byte of utf8 stream is converted to utf8 again!! :( Too bad! That's realy wrong!
I increase my username field length up to 4 times longer to have enough space for such completely Illegible strings.
Please help me humble!

See my table:

CREATE TABLE `ids` (
`userid` mediumint(9) NOT NULL default '0',
`username` varchar(120) collate utf8_unicode_ci default NULL,
`password` varchar(32) character set ascii collate ascii_bin default NULL,
`email` varchar(40) character set ascii default NULL,
`gender` char(1) character set ascii default NULL,
`loginkey` varchar(64) character set ascii collate ascii_bin default NULL,
PRIMARY KEY (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

Options: ReplyQuote




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.