简体   繁体   中英

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM