Re: ToUpper()



Ok, finally I did it like this :

private string ReplaceAccents(string chaine)
{

string strAccents= "ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÌÍÎÏìíîïÙÚÛÜùúûüÿÑñÇç";
string strNoAccents = "AAAAAAaaaaaaOOOOOOooooooEEEEeeeeIIIIiiiiUUUUuuuuyNnCc";

char[] tAccent = strAccents.ToCharArray();
char[] tNoAccent = strNoAccents .ToCharArray();

for(int i=0; i<strAccents.Length; i++)
{
chaine = chaine.Replace(tAccent [i].ToString(), tNoAccent [i].ToString());
}
return chaine;
}

J'ai pas trouvé mieux, même si ça boucle un peu pour rien...

Ornette.
"Ornette" <abstrait...nospam...@xxxxxxx> a écrit dans le message de news:DF19D390-EC69-42DF-B4F9-8B9C5355ADEC@xxxxxxxxxxxxxxxx
Hello,

I'm trying to convert strings to upper without the accents. For the moment, ToUpper converts é to E with an accent...
I tried to set up english culture (en) but it's the same...

Any ideas ?

Ornette.

.