Re: Language Settings and Numbers
From: jack (jackn_at_systemsynergy.com.dumpthispart)
Date: 02/19/05
- Next message: Jim Carlock: "Re: Question about WM_SYSCOMMAND"
- Previous message: kettelle: "Re: Question about WM_SYSCOMMAND"
- In reply to: J French: "Re: Language Settings and Numbers"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 19 Feb 2005 17:04:15 -0500
Thank you very much!
"J French" <erewhon@nowhere.uk> wrote in message
news:421756ce.372507806@news.btclick.com...
> 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: Jim Carlock: "Re: Question about WM_SYSCOMMAND"
- Previous message: kettelle: "Re: Question about WM_SYSCOMMAND"
- In reply to: J French: "Re: Language Settings and Numbers"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|