Accents and mysql

Accents and mysql

am 03.05.2005 16:21:13 von jonas

Hello

The second line gives me a "duplicate key violation". How do I solve it?

insert into mytable values('desire');
insert into mytable values('desir=E9');

Looks like the accent is ignored.

Thanks,
Jonas

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=3Dgcdmo-myodbc@m.gmane.o rg

RE: Accents and mysql

am 03.05.2005 17:44:38 von Keith Hufford

I'm haven't tested, but you could try concatenating 'desir' and =
chr$(130),
thusly:

=20
insert into mytable values (CONCAT ('desir', CHAR(130)));

HTH,

Keith=20

-----Original Message-----
From: Datatal AB - Gauffin, Jonas [mailto:jonas@datatal.se]=20
Sent: Tuesday, May 03, 2005 10:21 AM
To: myodbc@lists.mysql.com
Subject: Accents and mysql

Hello

The second line gives me a "duplicate key violation". How do I solve it?

insert into mytable values('desire');
insert into mytable values('desir=E9');

Looks like the accent is ignored.

Thanks,
Jonas

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe:
http://lists.mysql.com/myodbc?unsub=3Dkhufford@ehpservices.c om


--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=3Dgcdmo-myodbc@m.gmane.o rg

RE: Accents and mysql

am 03.05.2005 20:23:22 von James Moore

------=_NextPart_000_0015_01C54FD2.83EB4E90
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

MySQL has a very strange (to me, at least) concept of what to do with
accented characters. You want to read up on encoding; I ended up using
'collate utf8_bin' to get close to what I want, but I don't know what the
right thing to do is.

What I wanted was case-insensitive but accent-sensitive behavior; desire and
desire/ (where there's an acute accent on the ending e) are clearly distinct
words, but Desire and desire are not. I don't know the MySQL way to get
this behavior, hopefully someone else can inform us.

I suppose this behavior is because some languages don't allow accent marks
on upper-case letters, so life gets confusing when you're trying to figure
out how to combine case and accents. For languages that do require accents
on upper-case, combining the concepts of case and accents just doesn't make
any sense.

- James

------=_NextPart_000_0015_01C54FD2.83EB4E90--

RE: Accents and mysql

am 03.05.2005 20:43:34 von BBrown

I ran into this problem as well. However, I don't think it has anything =
to do with MyODBC. This is a problem with the implementation of the =
Unicode Collation Algorithm in the server. Mysql.com seems to believe =
that this behavior is what customers want. Based on my experience of =
what my customers want this doesn't seem to be the case. Further, it is =
inconsistent with other database engines (Oracle, MSSQL) I've worked =
with.

There is a forum on dev.mysql.com called Character Sets, Collation, =
Unicode. You might want to voice your complaint there as well.

According to Alexander Barkov responding to my post in the forum, =
providing accent sensitive collations is on their TODO list. See =
http://forums.mysql.com/read.php?103,22053. His response to this post, =
http://forums.mysql.com/read.php?103,22014, was that they would probably =
provide a new collation with accent sensitivity instead of changing =
utf8_unicode_ci.


-----Original Message-----
From: James Moore [mailto:banshee@banshee.com]
Sent: Tuesday, May 03, 2005 11:23 AM
To: myodbc@lists.mysql.com
Subject: RE: Accents and mysql


MySQL has a very strange (to me, at least) concept of what to do with
accented characters. You want to read up on encoding; I ended up using
'collate utf8_bin' to get close to what I want, but I don't know what =
the
right thing to do is.

What I wanted was case-insensitive but accent-sensitive behavior; desire =
and
desire/ (where there's an acute accent on the ending e) are clearly =
distinct
words, but Desire and desire are not. I don't know the MySQL way to get
this behavior, hopefully someone else can inform us.

I suppose this behavior is because some languages don't allow accent =
marks
on upper-case letters, so life gets confusing when you're trying to =
figure
out how to combine case and accents. For languages that do require =
accents
on upper-case, combining the concepts of case and accents just doesn't =
make
any sense.

- James

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=3Dgcdmo-myodbc@m.gmane.o rg