A
Alex
I'm working on an application which generates HTML pages. This application
is distributed to clients worldwide and one of them just reported a problem
that I find very weird.
Consider the following line of code:
sprintf(buffer,_T("var ScaleW=%lf;\r\n"),1.0);
On my machine, the output of this is:
var ScaleW=1.000000;
On his machine, the output is:
var ScaleW=1,000000;
In my mind (MSDN documentation confirms this, somewhat), sprintf should
always put a dot, rather than a comma or whatever is configured in the user
regional settings. I suppose there is a subtlety I haven't grasped yet and
I'm here to ask about it.
I tried changing my regional settings to match his and I am unable to
reproduce the problem. This leads me to think it might be a bug, or related
to some other difference between my system and his. I'm using US settings
myself, while he is using French (France) by default, and French
(Switzerland) for non-Unicode applications (my application is non-Unicode).
As mentionned before, matching those on my side did not reproduce the
problem.
One detail worthy of mentionning is the fact he has the 2.0 dotnet framework
installed on his computer, while I never installed it myself. I'm reluctant
to even installing it on my side since it's my dev machine and I would not
want my future release to require dotnet 2.0 just yet (I suppose installed
vs required are two things, but anyways).
Anybody can enlighten me on this issue?
Thanks alot,
Alex.
is distributed to clients worldwide and one of them just reported a problem
that I find very weird.
Consider the following line of code:
sprintf(buffer,_T("var ScaleW=%lf;\r\n"),1.0);
On my machine, the output of this is:
var ScaleW=1.000000;
On his machine, the output is:
var ScaleW=1,000000;
In my mind (MSDN documentation confirms this, somewhat), sprintf should
always put a dot, rather than a comma or whatever is configured in the user
regional settings. I suppose there is a subtlety I haven't grasped yet and
I'm here to ask about it.
I tried changing my regional settings to match his and I am unable to
reproduce the problem. This leads me to think it might be a bug, or related
to some other difference between my system and his. I'm using US settings
myself, while he is using French (France) by default, and French
(Switzerland) for non-Unicode applications (my application is non-Unicode).
As mentionned before, matching those on my side did not reproduce the
problem.
One detail worthy of mentionning is the fact he has the 2.0 dotnet framework
installed on his computer, while I never installed it myself. I'm reluctant
to even installing it on my side since it's my dev machine and I would not
want my future release to require dotnet 2.0 just yet (I suppose installed
vs required are two things, but anyways).
Anybody can enlighten me on this issue?
Thanks alot,
Alex.