MySQL: Special characters in strings

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
visionmaster
Forum Contributor
Posts: 139
Joined: Wed Jul 14, 2004 4:06 am

MySQL: Special characters in strings

Post by visionmaster »

Hello,

Searching for the string industrieofen using

Code: Select all

SELECT *
FROM `platzierungen_werbebanner`
WHERE `platzierungswort` LIKE  'industrieofen'
finds records holding either industrieofen or industrieöfen.

=> How can that be? How can I force MySQL to recognize the german charachter ö?


The tables structure is the following:

CREATE TABLE `commercial` (
`werbebanner_platzierungsid` int(10) unsigned NOT NULL auto_increment,
`platzierungswort` varchar(120) character set latin1 collate latin1_german1_ci NOT NULL default '',
`platzierungsfolge` tinyint(2) NOT NULL default '0',
PRIMARY KEY (`werbebanner_platzierungsid`),
KEY `platzierungsfolgeIndex` (`platzierungsfolge`),
KEY `platzierungswortIndex` (`platzierungswort`(50)),
KEY `statistikBannerIndex` (`id_firmendaten`,`platzierungsfolge`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1


Thanks for your help.
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

Look here
Post Reply