I'm trying to use 4.1.0-alpha's "extensive unicode support".

What I've learned so far: unicode only works in 4.1.0-alpha,
but it's not activated in the binary distribution, so I had
to compile it myself.

I can create  a table like this:

    CREATE TABLE unitest (
      ID mediumint(9) NOT NULL auto_increment,
      vc varchar(80) default NULL,
      t text,
      PRIMARY KEY  (ID)
    ) TYPE=MyISAM CHARSET=utf8;

I can insert Data into the table from perl, like this:

    use utf8;
    use charnames (':short');

    $uni = "ABc\N{greek:alpha}\x{00df}\N{cyrillic:e}";
    $dbh = DBI->connect("DBI:mysql:test", "someuser", "somepass");
    $dbh->do("INSERT INTO unitest VALUES (NULL,?,?)", undef, $uni, $uni)
      or print $dbh->errstr;

Now I try to read the data, this time from the commandline client:

    mysql> select * from unitest WHERE ID=72;
    +----+-----------+-----------+
    | ID | vc        | t         |
    +----+-----------+-----------+
    | 72 | ABcαÃ?Ñ? | ABcαÃ?Ñ? |
    +----+-----------+-----------+
    1 row in set (0.00 sec)

doesn't look good in e-mail (no unicode here), doesn't look good in 
my commanline client either (no unicode there).  but *something' is in
there, and it's the same in the varchar and in the text field.
I find that encouraging.

now i want to search in the unicode string:

    mysql> select * from unitest WHERE vc LIKE 'A%';
    ERROR 1210: Wrong arguments to like
    mysql> select * from unitest WHERE t LIKE 'A%';
    ERROR 1210: Wrong arguments to like


am i doing something wrong here?  or is this the
correct behaviour?  

   please help

   Brigitte


p.s.   I promise I will write a nice tutorial about all this, 
  if I ever get it to work correctly.

-- 
Brigitte       'I never met a chocolate I didnt like'         Jellinek
[EMAIL PROTECTED]                            http://www.horus.at/~bjelli
http://perlwelt.horus.at http://www.perlmonks.org/index.pl?node=bjelli

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

Reply via email to