Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - find decimal separator

Reply
 
Old 08-20-2009   #1 (permalink)
arno


 
 

find decimal separator

Hi,

(Kind of a repost)

Is there a way to find out what the system's decimal separator and
thousands separator characters are.

GetLocale will get me an Locale ID, but it's settings can be
overridden. I want to specifically know these two values.

tia
arno

My System SpecsSystem Spec
Old 08-20-2009   #2 (permalink)
mr_unreliable


 
 

Re: find decimal separator

arno wrote:
Quote:

> Is there a way to find out what the system's decimal separator and
> thousands separator characters are.
>
> GetLocale will get me an Locale ID, but it's settings can be
> overridden. I want to specifically know these two values.
>
hi Arno,

If all else fails, you could use a "Brute Force" approach.
That is, use the "FormatCurrency" method on some number,
and then just use some character-by-character disassembly
to examine the result to see what the separators are.

cheers, jw
____________________________________________________________

You got questions? WE GOT ANSWERS!!! ..(but, no guarantee
the answers will be applicable to the questions)

p.s., if you don't mind calling the system api from script,
then you would use the "GetCurrencyFormat" or "GetCurrencyFormatEx"
api call.

http://msdn.microsoft.com/en-us/libr...84(VS.85).aspx

Aside from getting the separators right, if you are dealing with
India or China, there are also different ways of "grouping",
i.e., not everybody groups by three's.

http://blogs.msdn.com/oldnewthing/ar...18/578251.aspx
My System SpecsSystem Spec
Old 08-21-2009   #3 (permalink)
arno


 
 

Re: find decimal separator

Seems to do the trick, tx!

arno

On Fri, 21 Aug 2009 04:18:50 -0700 (PDT), Tom Lavedas
<tglbatch@xxxxxx> wrote:
Quote:

>Your approach is not all that 'brute-force', since the input number
>for the test is under your control.
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Separator pages display incorrect user name in Vista Vista General
Can I use Import-CSV when separator is semicolon? PowerShell
Convert Decimal to Binary PowerShell
Stock Gadget decimal places Vista General
PInvoke and Decimal to Binary Conversion PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46