Forcing locale upon a specific .net application

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.

liorda

Posted 2016-08-03T11:35:49.177

Reputation: 135

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.407

No answers