Re: ToUpper()
- From: "Ornette" <abstrait...nospam...@xxxxxxx>
- Date: Thu, 1 Mar 2007 02:56:46 +0100
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.
.
- Follow-Ups:
- Re: ToUpper() Better solution
- From: Ornette
- Re: ToUpper() Better solution
- References:
- ToUpper()
- From: Ornette
- ToUpper()
- Prev by Date: ToUpper()
- Next by Date: Re: ToUpper() Better solution
- Previous by thread: ToUpper()
- Next by thread: Re: ToUpper() Better solution
- Index(es):