vradarserver / vrs

A .NET web server that can plot the positions of aircraft on a map
http://www.virtualradarserver.co.uk/
Other
267 stars 50 forks source link

Fixed locale specific issues and Build.bat fix for VS2022 #75

Closed snake-4 closed 2 years ago

snake-4 commented 2 years ago

ToUpper and ToLower functions are locale dependent so they will have different behaviors on different locales and their usage should be avoided. I've changed the code to use locale invariant comparison string functions and changed the other uses of ToUpper and ToLower to their locale invariant versions. The Build.bat fix is required to be able to use it with VS2022, I know that paths for VS2022 could be hardcoded instead but removing them altogether is future-proof. The Build.bat should be ran through the Developer PowerShell that the VS provides instead.

snake-4 commented 2 years ago

While the Invariant versions have a shorter execution time, the main reason behind the changes was fixing the Turkish 'İ' problem as it caused significantly different behaviours on systems with the tr-TR locale.