VDF-GUIdance logo



  Visual DataFlex Logo
  

Shared knowledge leads to accumulated knowledge

        Printer Friendly Page


No Files Available
Date Created: 02/27/2004
Date Updated: 02/28/2004
Author: Wil van Antwerpen
Company: Antwise Solutions
Summary:
On some computers the decimal separator on the numerical keypad doesn't seem to respect the regional settings of your language. As an example for dutch the decimal separator is a comma (",") whereas for the US this is a dot (".")
In certain conditions, if you try to use the decimal separator key in a numerical field, pressing the key generates an errorbeep instead of the comma.

Decimal Separator on the Numerical Keypad


by Wil van Antwerpen
created: February 27, 2004
Last update: February 28, 2004

Explanation of the problem


The decimal separator key on the numerical keypad doesn't seem to like a symbol different as the standard US one (a ".")
Which is cool if you live in the US, down here in Europe we prefer to use a comma (a ",") as decimal separator symbol.
Retrieving the DF_DECIMAL_SEPARATOR attribute with the Get_Attribute command seems to work fine, but the problem is that you cannot use the key on your keyboard to input a decimal symbol in a numerical field.

What makes it more frustrating is that other applications such as excel correctly translate the dot into a comma (European settings)
We all know that an MS Office product is a bit of a wary way of comparing things, but it is exactly how our customers think, so that makes it kind of okay. In this case it really is _not_ a good test as you can see below.

The problem is mainly an Operating System settings problem that can be resolved by tuning the default settings a bit more into detail.
There are 3 locale settings that can come to play here.
  1. The user locale settings
  2. The system locale settings
  3. The non-Unicode locale settings

Tested Environments


  • Windows XP Prof SP1
  • Windows 2000 Prof SP4
  • Windows 2000 Server SP4
  • Windows 2000 Terminal Services

  • VDF7.3
  • VDF9.1

Application used to reproduce the problem: Standard Order Entry

Analyzing the problem


Okay so what the heck is wrong?
If you change your locale settings into the one from your country (-dutch Netherlands- in my case) on a normal windows 2000 box then it immediately appears to work fine (tested with standard order entry example, order entry view and customer view)
When i saw that happening i cheered with joy.

So what makes XP different in this respect i wondered. One thing about Windows XP is that it has been optimized for use with multiple users (Fast User Switching) so this is something to keep in mind.
Besides the normal regional settings (the user locale settings) there is also a machine default (the system locale settings) which may be set differently.
To top that off there are also regional settings for non-Unicode programs and as you might know, a VDF-program is by definition a non-Unicode program.

A solution


So for XP Prof (US edition) go into
 ->Settings
    -> Control Panel
      -> Regional and language options

First tabpage: Make sure that the following options are set to your language and region, again: Dutch (Netherlands) in my case
  - Standards and formats
  - Location

At this stage you would expect everything to be fine and dandy.
Guess what? It isn't
Now go to the advanced tabpage and change the language for non-Unicode programs into your language too.
Click apply...
Note: You also might want to check the checkbox for the Default user account settings, it wasn't required in my case but it is something to keep in mind.

Now your machine will ask if you want to copy drivers from your CD or use the ones on your machine. I used the one on my machine and then you have to reboot the box.
After rebooting you will notice that your decimal separator key now works as you want it to be.

I tested this also with Windows 2000 Server and Remote desktop and the problems i had in there were resolved in a similar matter.

Recommendations and acknowledgements


I hope that DAW will look into this matter and solve this on a user by user bases... or reads the information from the Unicode settings.
Whatever it takes ;-)

If you try to resolve the same problem on your end and it doesn't work for your particular regional settings, then try changing your regional settings to "Dutch (Netherlands)" to make sure that you didn't leave anything out by accident.

Special thanks to Sergey Natarov and Sonny Falk