In a unit test I have this:
LastName = "Näs"
This is later encoded so I want to make sure that it is correct. Works fine for me on my configuration (swedish regional settings).
But Yuriy who sits in Ukraine with Ukrainian settings don’t see this. Instead he sees this:
LastName = "Nдs"
This makes the unit test fail… 🙁
It should be utf-8, so why doesn’t he see the same character..?
It depends how Visual Studio is reading the file… if it’s opening it and assuming some other encoding, that will cause a problem. You need to either make sure everyone has the same settings, standardizing on UTF-8, or use the
\uxxxx escapefor any non-ASCII characters in your source code.Standardizing is more error-prone but the code ends up being easier to read;
\uxxxxis robust but a pain from a readability standpoint 🙁