Comparing strings with accented characters

  • Thread starter Thread starter Reg Rat
  • Start date Start date
R

Reg Rat

Hello all,
I'm led to believe that the .Net framework offers intelligent string
comparison such that é follows e in an alphabetic sort rather than appearing
after z, for example. Does this mean that there is a mechanism for comparing
strings that may or may not have accents and having them shown as identical
(e.g. comparing Herve with Hèrvé would show a match). Ideally, this should
be culture neutral as I will not have knowledge of which language the names
come from.
Does this sound feasible, as I am loathe to create tables of 'identical'
characters and doing a manual comparison using them?
Thanks for any advice,
Reg
 
Reg Rat wrote:

I'm led to believe that the .Net framework offers intelligent string
comparison such that é follows e in an alphabetic sort rather than appearing
after z, for example.

That depends on the CultureInfo you use.
Does this mean that there is a mechanism for comparing
strings that may or may not have accents and having them shown as identical
(e.g. comparing Herve with Hèrvé would show a match). Ideally, this should
be culture neutral as I will not have knowledge of which language the names
come from.
Does this sound feasible, as I am loathe to create tables of 'identical'
characters and doing a manual comparison using them?

Maybe you can use/create your own CompareInfo instance for that.
 
Back
Top