How to fix weird conversion from String.ToUpper () to C #

I am trying to show something like "contáctenos" in uppercase, but when I use the string.toUpper () method, I have a strange result "CONTACTENOS" instead of "CONTÁCTENOS".

The culture page is set correctly for es-ES and niculture. How can I get the correct result, if possible, without using a regular expression or replacement.

Thanks in advance...

+3
source share
2 answers

using:

.ToUpper(new CultureInfo("es-ES", false));

link: http://msdn.microsoft.com/en-us/library/24kc78ka.aspx

+3
source

string.ToUpper() CultureInfo.CurrentCulture, , , CurrentUICulture. CultureInfo ToUpper, .

+2

Source: https://habr.com/ru/post/1789155/


All Articles