Solved

Reginal Settings

Posted on 1997-05-30
2
311 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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…

821 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