> > I'll give that a shot. However, it would be preferable if I didn't
> > have to set the culture of my threads manually in the first place.
[quoted text clipped - 76 lines]
> >> > }
> >> > }
> You have a valid point, however this particular application will be
> highly controlled and the install will be regulated down to the
[quoted text clipped - 3 lines]
> are currently experiencing the problem didn't set this and would like
> to know how to change it back to "+".
That puts a very different spin on things... If the users didn't make the
change deliberately, it's very likely that some rather impolite software
changed the setting on their behalf.
> At the moment I have no idea how to set the positiveSign property
> outside of code and would love to find out how to do so.
Assuming that the problem does lie in the regional settings, you should be
able to change it back to an empty string by editing the sPositiveSign value
under the HKEY_CURRENT_USER\Control Panel\International registry key.
> I think that
> 99.999% of coders would never have worried about this in the first
> place. If it were even remotely common I would have found postings
> about it already since parsing is a very common operation. Do you
> commonly set the cultures on all of your threads?
Yes, and I also use parsing method overloads that allow me to specify the
culture settings explicitly. However, it's true that many folks don't, but
they're probably not running into the same problem as you are given that
setting "0" as the positive sign is likely to be rare.
> I have no problem with the designers picking up a "0" as the positive
> sign and running with it. I would do it too. But the user who figured
[quoted text clipped - 9 lines]
> Anyway, I am still curious where this setting comes from and why in
> "en-US" of all places, it is set to "0".
If it is due to a regional settings modification, it's being picked up for
en-US simply because that's the base culture for the current user's regional
settings under Windows.
>> > I'll give that a shot. However, it would be preferable if I didn't
>> > have to set the culture of my threads manually in the first place.
[quoted text clipped - 88 lines]
>> >> > }
>> >> > }
dorminey@gmail.com - 02 Aug 2006 18:04 GMT
Thanks for the help Nicole. Microsoft came through with the registry
setting this morning and we changed it. The interesting thing is that
we had found the setting before but it was blank on all the machines;
even the ones that didn't work. Microsoft support told us to set it to
"0" and then back to blank. We did so and the problem computers
magically worked. I can only think that .NET caches this info
somewhere and it was corrupted somehow.
I had been under the impression that in previous versions of the
framework this kind of information was kept in a separate place than
the OS. Even now I know that it will look in %WINNT%\Globalization for
.nlp files (even though it appears empty on our boxes currently).
However after playing with this registry setting and VS2003 I realize
that these settings have always been picked up from the registry.
I have in the past been concerned with culture settings when parsing
numbers containing decimal points or monetary sybols, etc.. I will be
more concerned about it in general after this experience. It would
seem that even when the culture of the target machines are a "given",
things can go wrong (though here we have more control than usual).
> > You have a valid point, however this particular application will be
> > highly controlled and the install will be regulated down to the
[quoted text clipped - 136 lines]
> >> >> > }
> >> >> > }