For Programmers: Free Programming Magazines  


Home > Archive > ASP > October 2004 > Dynamically Change Codepage?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Dynamically Change Codepage?
Alex

2004-10-29, 3:55 pm

Dear all,

I am now creating an CMS which support 3 languages (English, Traditional
Chinese and Simplified Chinese). The user can change their languages
dynamically; however, I would like to know how can I change the codepage (<%
code=936%> ) dynamically? THank you for all of your help.

Alex Yung


Ray Costanzo [MVP]

2004-10-29, 3:55 pm

You could put a dropdown at the top of the page like so.

<%
Select Case Request.Querystring("l")
Case "b"
Session.CodePage = 936 'or whatever traditional Chinese is
Case "c"
Session.CodePage = 932 'or whatever simplified Chinese is
Case Else
Session.CodePage = 1252
End Select
%>

<select name="l"
onchange="location.href='<%=Request.ServerVariables("PATH_INFO")%>?l='+this.value;">
<option value="a">English</option>
<option value="b">Traditional Chinse</option>
<option value="c">Simplified Chinese</option>
</select>

Ray at work

"Alex" <alex@f-technology.com> wrote in message
news:u1qHjubvEHA.716@TK2MSFTNGP10.phx.gbl...
> Dear all,
>
> I am now creating an CMS which support 3 languages (English, Traditional
> Chinese and Simplified Chinese). The user can change their languages
> dynamically; however, I would like to know how can I change the codepage
> (<%
> code=936%> ) dynamically? THank you for all of your help.
>
> Alex Yung
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com