IIS 6.0 local LCID problem

IIS 6.0 local LCID problem

am 28.08.2007 12:47:42 von Just4U

Hello,

I take an old post because, nobody seem to answer my problem.

Config: Windows 2003 x64 (US) + sp2
Regional settings : French (for all & default users)

Basically I have the following code on my server


<%
Session.LCID=1033
SetLocale(1033)
Response.Write "America
"
Response.Write FormatDateTime(now,vbshortDate)&"
"
Response.Write FormatNumber(1000.523)&"
"
Session.LCID=2057
SetLocale(2057)
Response.wRIte "UK
"
Response.Write FormatDateTime(now,vbshortDate)&"
"
Response.Write FormatNumber(1000.523)&"
"
Session.LCID=1036
SetLocale(1036)
Response.wRIte "French
"
Response.Write FormatDateTime(now,vbshortDate)&"
"
Response.Write FormatNumber(1000.523)&"
"
Session.LCID=1031
SetLocale(1031)
Response.wRIte "German
"
Response.Write FormatDateTime(now,vbshortDate)&"
"
Response.Write FormatNumber(1000.523)&"
"

%>


very simple, all it does is set the session.LCID to four different
locales (US,UK,French, German) when no one if physically logged on to
the webserver in question, it writes out the data/number
format for US in UK format (the machine locale) however it does French
and German in the correct format. If someone is logged on to the machine
it starts to show the US format in the correct format.

So does anyone know why this is happening and if so any solution to the
problem?


Thank you

Re: IIS 6.0 local LCID problem

am 28.08.2007 13:37:30 von exjxw.hannivoort

Just4U wrote on 28 aug 2007 in microsoft.public.inetserver.asp.general:

> Hello,
>
> I take an old post because, nobody seem to answer my problem.
>
> Config: Windows 2003 x64 (US) + sp2
> Regional settings : French (for all & default users)
>
> Basically I have the following code on my server
>
>
> <%
> Session.LCID=1033
> SetLocale(1033)
> Response.Write "America
"
> Response.Write FormatDateTime(now,vbshortDate)&"
"
> Response.Write FormatNumber(1000.523)&"
"
> Session.LCID=2057
> SetLocale(2057)
> Response.wRIte "UK
"
> Response.Write FormatDateTime(now,vbshortDate)&"
"
> Response.Write FormatNumber(1000.523)&"
"
> Session.LCID=1036
> SetLocale(1036)
> Response.wRIte "French
"
> Response.Write FormatDateTime(now,vbshortDate)&"
"
> Response.Write FormatNumber(1000.523)&"
"
> Session.LCID=1031
> SetLocale(1031)
> Response.wRIte "German
"
> Response.Write FormatDateTime(now,vbshortDate)&"
"
> Response.Write FormatNumber(1000.523)&"
"
>
> %>
>
>
> very simple, all it does is set the session.LCID to four different
> locales (US,UK,French, German) when no one if physically logged on to
> the webserver in question, it writes out the data/number
> format for US in UK format (the machine locale) however it does French
> and German in the correct format. If someone is logged on to the
> machine it starts to show the US format in the correct format.
>
> So does anyone know why this is happening and if so any solution to
> the problem?

I do not think you can or should change the locale after a
response.write.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Re: IIS 6.0 local LCID problem

am 28.08.2007 13:56:46 von Just4U

Hello,

yes i can because it's work for other LCID except for 1033 !!
Here is my test code:

I did a simple test:
<%
ReturnDateTime 1033, "English (US)"
ReturnDateTime 1036, "French"
ReturnDateTime 3081, "English (Australia)"

Sub ReturnDateTime(locale, description)
Session.LCID = locale
Response.Write "" & description & " (LCID = " & locale &
")

"
Response.Write "Long date: " & FormatDateTime(Date, 1) & "
"
Response.Write "Short date: " & FormatDateTime(Date, 2) & "
"
Response.Write "

" & FormatCurrency(1.05, 2) & "
"
Response.Write "
" & FormatNumber(1000000,2) & "

"
End Sub

%>

Results:

English (US) (LCID = 1033)
Long date: Monday 27 August 2007
Short date: 27/08/2007
1,05 €
1 000 000,00

French (LCID = 1036)
Long date: lundi 27 août 2007
Short date: 27/08/2007
1,05 €
1 000 000,00

English (Australia) (LCID = 3081)
Long date: Monday, 27 August 2007
Short date: 27/08/2007
$1.05
1,000,000.00



Evertjan. wrote:
> Just4U wrote on 28 aug 2007 in microsoft.public.inetserver.asp.general:
>
>
>>Hello,
>>
>>I take an old post because, nobody seem to answer my problem.
>>
>>Config: Windows 2003 x64 (US) + sp2
>>Regional settings : French (for all & default users)
>>
>>Basically I have the following code on my server
>>
>>
>><%
>>Session.LCID=1033
>>SetLocale(1033)
>>Response.Write "America
"
>>Response.Write FormatDateTime(now,vbshortDate)&"
"
>>Response.Write FormatNumber(1000.523)&"
"
>>Session.LCID=2057
>>SetLocale(2057)
>>Response.wRIte "UK
"
>>Response.Write FormatDateTime(now,vbshortDate)&"
"
>>Response.Write FormatNumber(1000.523)&"
"
>>Session.LCID=1036
>>SetLocale(1036)
>>Response.wRIte "French
"
>>Response.Write FormatDateTime(now,vbshortDate)&"
"
>>Response.Write FormatNumber(1000.523)&"
"
>>Session.LCID=1031
>>SetLocale(1031)
>>Response.wRIte "German
"
>>Response.Write FormatDateTime(now,vbshortDate)&"
"
>>Response.Write FormatNumber(1000.523)&"
"
>>
>>%>
>>
>>
>>very simple, all it does is set the session.LCID to four different
>>locales (US,UK,French, German) when no one if physically logged on to
>>the webserver in question, it writes out the data/number
>>format for US in UK format (the machine locale) however it does French
>>and German in the correct format. If someone is logged on to the
>>machine it starts to show the US format in the correct format.
>>
>>So does anyone know why this is happening and if so any solution to
>>the problem?
>
>
> I do not think you can or should change the locale after a
> response.write.
>
>