Solved

Reginal Settings

Posted on 1997-05-30
2
313 Views
Last Modified: 2013-12-03
I running a Windows NT 4.0 and the Regional Settings are set to Swedish.
When I'm calling GetLocaleInfo to get the digit grouping symbol which is
a space character with ascii 32 it returns a space character but the
ascii is set to -96. Why ????. When the digit grouping symbol is set to
a comma it works just fine.

Here is the code:
char szThousandSymbol[10];
GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, (LPTSTR) szThousandSymbol, sizeof(szThousandSymbol));

Regards,
torbjorn.berglund@reterm.se
0
Comment
Question by:tberglund
2 Comments
 
LVL 4

Expert Comment

by:AVaulin
ID: 1397723
Did you check what value returned GetLocaleInfo?
0
 
LVL 15

Accepted Solution

by:
NickRepin earned 10 total points
ID: 1397724
-96 (signed char==char) equal 160 (unsigned char) equal space in windows-character set (ANSI). So it's all ok.
I get also -96 for my Russian locale (of course, it is strange, but it's not error).

You can invoke

   char buf[10]=" ";   // just space character
  SetLocaleInfo(.....,LCID_STHOUSAND,str);

and then check GetLocaleInfo. It will return 32!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question