Problem tested using both version 4.0.18 and 4.1.1

This query gets first byte of utf8 character, not two bytes

If I use

SELECT LEFT(FieldName, 2) AS FirstLetter, COUNT(*) FROM TableName GROUP BY
FirstLetter


gets right utf8 characters but others wrong

for example;

+--------+-------+
| Ai     |     1 |
| Ak     |     9 |
| Ar     |    33 |
| İ       |     8 |


I couldn't find 4.1.2 dev source for testing. Can you tell me how I can get
it please.

Does anybody knows another solution except getting dev source?


----- Original Message -----
From: "Jeremy March" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 13, 2004 5:34 AM
Subject: re: utf8 - left function


> > Hi,
> >
> > I need this query;
> >
> > SELECT LEFT(FieldName, 1) AS FirstLetter, COUNT(*) FROM TableName
> > GROUP BY FirstLetter
> >
> > my datas in utf8 format. I can't get first characters of the datas in
> > utf8 format but others is ok.
> >
> > Any suggestion?
> >
> > Thank you
>
> It works for me.  I'm using the development source 4.1.2.  Maybe the
> problem has already been fixed. You are using a 4.1.x version, right?
> It definitely would not work before 4.1.




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

Reply via email to