I have the following code:
string input = "ç";
string normalized = input.Normalize(NormalizationForm.FormD);
char[] chars = normalized.ToCharArray();
I build this code with Visual studio 2010, .net4, on a 64 bits windows 7.
I run it in a unit tests project (platform: Any CPU) in two contexts and check the content of chars
:
- Visual Studio unit tests : chars contains
{ 231 }
. - ReSharper : chars contains
{ 231 }
. - NCrunch : chars contains
{ 99, 807 }
.
In the msdn documentation, I could not find any information presenting different behaviors.
So, why do I get different behaviors? For me the NCrunch behavior is the expected one, but I would expect the same for others.
Edit: I switched back to .Net 3.5 and still have the same issue.
Thread.CurrentThread.CurrentCulture
in each case? – Forlinichars
'? – JeopardousThread.CurrentThread.CurrentCulture
isfr-FR
. I also checkedThread.CurrentThread.CurrentUICulture
which isen-US
in all cases. – Kulsethchars
variable in the debugger, then unfold the+
sign. – Kulsethç
character in my example, but I get the same behavior with all of the french accentuated characters I have tested. – Kulsethstring.Normalize
behave differently. – Kulseth