List:General Discussion« Previous MessageNext Message »
From:Fernando Martins Date:May 5 1999 11:17pm
Subject:Re: Using LIKE with different languages
View as plain text  
>[cut]
>Giancarlo> This is a important feature that I think, is missing in MySQL. I
also work
>Giancarlo> with MS-SQL Server and it does not have this problem.>

>Does MS-SQL server really compare 'e' and 'é' as the same with = and LIKE ?


Yes and No, depending on the meaning of your question. YES, meaning that
both operators behave consistently. NO, meaning that 'e' and 'é' CAN be
treated differently. The way comparisons are handled depends on the Sort
Order defined during SQL Server installation. Every database created with
each installation uses the same Sort Order. The Sort Order also applies to
object names (tables,...)

>
>At any rate; I once asked on this list which should be the 'right'
>behavour for LIKE.  Then most people didn't want to match 'e' and 'é'
>with LIKE.  (I actually didn't get that many respones...)
>
>I could easily change this, I am only afraid to break applications
>that depend on the current behaveour.

[cut]

Clearly, this is a structural decision, not to be taken lightly. Some needs
the accent and case sensitiveness, others don't (combinations apply).
The Sort Order even depends on the country.

I don't have MySQL installed (yet), much less using it, and I don't know how
do you handle Sort Order in general, but I believe this should depend on
each database (more flexibility, less performance) or on the server install
(less flexibility, more performance).
I believe all comparisons should be treated the same, for consistency.
Another possibility could be to have diferent LIKE operators to handle
different comparison situations concerning case and accented chars
(obviously not a standard one neither ellegant one)

If your LIKE implementation supports set regular expression (using []
operators), this problem can be alleviated, eg. LIKE 'Bag[eé]'

Fernando C Martins










Thread
Using LIKE with different languagesGiancarlo Bonansea30 Apr
  • Re: Using LIKE with different languagesVladimir Berezniker30 Apr
  • Using LIKE with different languagesMichael Widenius2 May
RE: Using LIKE with different languagesGiancarlo Bonansea30 Apr
Re: Using LIKE with different languagesFernando Martins6 May