Solved

Reginal Settings

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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 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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now