0
1
In my .net application, I'm loading a CSV file and then parsing the fields using float.Parse()
.
Users from Germany who run Windows 7 (and 8) have their region set to Germany. This causes decimal points in the CSV values to be parsed as thousands limiter (I guess the culture info is German)
It's going to take a while before releasing a fixed version, so in the meanwhile, is there any way to force localization settings for only this app?
I think the Linux equivalence would be something like LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 ./app
.
Thanks.
In my .net application
- the best way would be to handle it by your code in your application, .net can detect current culture info. – Vojtěch Dohnal – 2016-08-03T11:41:28.767@VojtěchDohnal Thanks, but I can't release a fix at the moment and would prefer a quick workaround – liorda – 2016-08-03T11:43:13.253
I think your only chance will be to write a proxy app as suggested here http://stackoverflow.com/a/15350829/2224701
– Vojtěch Dohnal – 2016-08-03T11:52:33.407https://stackoverflow.com/questions/27722032/c-sharp-float-parse-string – JosefZ – 2019-02-02T21:55:40.353