vbscriptasp-classicdecimal-pointlcidinvariantculture

How to Set CultureInfo to InvariantCulture Classic ASP (VBScript)


I am looking for a way to set a Classic ASP page's Culture Info to Invariant Culture so that the decimals have a dot and not a comma. This gives me allot of issues, On windows 8 doesn't work, get it to work on windows 8, then it doesn't work on previous versions of windows anymore.

In C# the whole thread's Culture can be set once and forget about it,

Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture

How can I achieve something like this with Classic ASP? I tried setting the LCID on top of each page as well as in the session

<%@ LANGUAGE="VBScript" LCID=7177%>

Session:

Session.LCID=7177

But this does not work

EDIT:

In <%@ LANGUAGE="VBScript" LCID=7177%> I Changed LCID=7177 to LCID="127"

I have set Session.LCID=127

In IIS under ASP tab, I set Locale ID to 127

and in the Web.Config, I set globalization

<configuration>
    <system.web>
        <globalization culture="" uiCulture="" />
    </system.web>
</configuration>

I am not sure, which of these made the difference, But It works now and the Decimal values have a dot in them and not a comma


Solution

  • Based on this article (I know it's but should translate just fine for the LCID, could you not use;

    'Invariant Culture
    Session.LCID = 127