Re: Language Settings and Numbers
From: J French (erewhon_at_nowhere.uk)
Date: 02/19/05
- Next message: Ralph: "Re: Refactoring and metrics"
- Previous message: thejamie: "RE: Why Compiler Const Error when no Compiler Const exists"
- In reply to: jack: "Language Settings and Numbers"
- Next in thread: jack: "Re: Language Settings and Numbers"
- Reply: jack: "Re: Language Settings and Numbers"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 19 Feb 2005 15:18:53 +0000 (UTC)
On Sat, 19 Feb 2005 09:47:33 -0500, "jack"
<jackn@systemsynergy.com.dumpthispart> wrote:
>Hello,
>
>I have a VB6 application that has been distributed worldwide. Because of
>Windows XP language settings, in some locales the users use a comma as a
>decimal place holder and a period as a thousands separator. This application
>must support the use of commas and periods in the English way and the way I
>just described.
>
>The primary issue I'm experiencing is with calculations. The numbers for
>calculations are coming from a database of English values. So, an example of
>my issue is the app retrieves values of 10.1 and .1 from the database. The
>calcuation that takes place is 10.1 - .1. In English, this simple math
>equals 10. If a users language setting is Italian, the calculation is seen
>by VB as 101 - 1 which of course equals 100.
>
>One solution I thought of is to replace commas and periods with the correct
>character based on the language setting. I'm a bit uncomfortable with this
>because something is telling me it won't work in all circumstances.
>
>Is there anyway to force VB to see things in English when it comes to
>calculations? Or, is there a conversion method to English from another
>language?
Just dont't use CStr - use Val
- stuff Format - use Str$() and maybe some stuff on top
Avoid all Locale aware conversions
- Next message: Ralph: "Re: Refactoring and metrics"
- Previous message: thejamie: "RE: Why Compiler Const Error when no Compiler Const exists"
- In reply to: jack: "Language Settings and Numbers"
- Next in thread: jack: "Re: Language Settings and Numbers"
- Reply: jack: "Re: Language Settings and Numbers"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|