Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: ADO Recordset via HTTP >Thread Next - Re: ADO Recordset via HTTP Re: ADO Recordset via HTTPTo: NULL Date: 12/3/2005 5:30:00 PM
Adry wrote:
> In this scenario, I suppose, regional settings don't affect in rebuilding
> recordset.
I am not sure where the problem is introduced but the following VBScript
program shows that VBScript parses strings as numbers depending on
locale settings:
Option Explicit
Sub CheckParsing (InputString, LocaleToUse)
Dim OldLocale
OldLocale = SetLocale(LocaleToUse)
Dim N
N = CDbl(InputString)
WScript.Echo "Locale is: " & LocaleToUse _
& "; parsed '" & InputString & "' as number " & _
N
SetLocale OldLocale
End Sub
Dim InputString
InputString = "12.75"
CheckParsing InputString, GetLocale
CheckParsing InputString, "it-IT"
CheckParsing InputString, "de-DE"
CheckParsing InputString, "en-US"
Outputs the following here on Windows XP German:
Locale is: 1031; parsed '12.75' as number 1275
Locale is: it-IT; parsed '12.75' as number 1275
Locale is: de-DE; parsed '12.75' as number 1275
Locale is: en-US; parsed '12.75' as number 12.75
I don't think MSXML DOMDocument will do any such stuff, I am not sure
whether the ADODB components when building record sets somehow depend on
locale settings.
I have no other idea, somehow 12.75 showing up as 1275 for me too much
looks like parsing assuming the wrong locale and not interpreting the
'.' symbol as the decimal separator.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
