Hello and sorry for a dumb question, but this is my third day of experimenting
and surprisingly no luck with archives, so:

Is UTF-8 case insensitive search OK?

set @@character_set_client=utf8;
set @@character_set_server=utf8;
set @@character_set_connection=utf8;
set @@character_set_results=utf8;
set @@collation_server=utf8_general_ci;
set @@collation_database=utf8_general_ci;
set @@collation_connection=utf8_general_ci;

-- all the following strings were positively represented by UTF-8 during experiment


UPDATE liveshow SET title='PŘÍLIŠ ÓDY' WHERE id=215;
...it is in there

select id from liveshow where title like '%PŘÍLIŠ%' COLLATE utf8_general_ci;
...result: found record 215

select id from liveshow where title like '%příliš%' COLLATE utf8_general_ci;
...result: small letters>empty set


If this e-mail has been displayed incorrectly: the search did not recognize
smallcase and capital letters with diacritics during case insensitive LIKE search.

How the experiment was conducted: commands were written in UTF-8 editor and
presented to mysql through:

mysql --default-character-set=utf8 -u myname -p prenosy < utftest.sql

This all on untarred MySQL 4.1.1 on top of Debian Linux 3.0 .

show create database prenosy;
+----------+------------------------------------------------------------------+
| Database | Create Database                                                  |
+----------+------------------------------------------------------------------+
| prenosy  | CREATE DATABASE `prenosy` /*!40100 DEFAULT CHARACTER SET utf8 */ |
+----------+------------------------------------------------------------------+
1 row in set (0.00 sec)


show create table liveshow;
| liveshow | CREATE TABLE `liveshow` (
  `id` int(11) NOT NULL auto_increment,
  `starttime` datetime default NULL,
  `title` varchar(100) default NULL,
  ...
  PRIMARY KEY  (`id`)
) TYPE=MyISAM DEFAULT CHARSET=utf8 |


/etc/my.cnf
[client]
set-variable = default-character-set=utf8


What am I missing?

Thank you in advance,

Ivan


PS: advices inspired by
http://perlwelt.horus.at/Beispiele/Magic/PerlUnicodeMysql/ like

UPDATE liveshow SET title=CONVERT(_utf8'PŘÍLIŠ ÓDY' USING utf8) WHERE id=215;

select title from liveshow where title like CONVERT(_utf8'%PŘÍLIŠ%' USING utf8)
COLLATE utf8_general_ci;

in UTF-8 document were no help. Other Googles were pretty much just manpages...


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to