Let’s say I have page A, which uses ks_c_5601-1987(Korean) as encoding and page B, using UTF-8 (Korean) as encoding. I need to pass a string variable from A to B that is in Korean. Because two pages use a different encoding, the variable gets jumbled up when B receives it using Request().
How can I encode the string variable in A to UTF-8 when passing it to B? I’m aware that setting both pages as UTF-8 encoding scheme is the most sensible solution here but it unfortunately is not an option here since page A uses several dlls that relies entirely on ks_c_5601-1987 encoding.
Edit: After reviewing the answer, I have went ahead and tried the method. This is the code to send the variable mailbox into get_list_center.asp:
<!--mail_mail.asp, page in ks_c_5601-1987-->
<%
dim mailbox = "테스트"
Response.CodePage = 65001 'Response.write should now encode the string into UTF-8
%>
...
<frame name="get_list_center" scrolling="auto" marginwidth="0" framespacing="0" marginheight="0" frameborder="0" src="get_list_center.asp?mailbox=<%=mailbox%>">
and this is how I’m receiving the variable in get_list_center.asp:
<%
Session.Codepage=65001
Response.CharSet="UTF-8"
response.Write CStr(response.codepage) & "<BR>"
response.Write CStr(session.CodePage) & "<BR>"
response.Write CStr(response.CharSet) & "<BR>"
response.codepage = 949
response.Write mailbox & "<BR>"
response.codepage = 65001
response.Write mailbox & "<BR>"
%>
Here is the result:

Both 949 (ks_c_5601-1987) and 65001 (UTF-8) versions of response.write comes out broken. Is there anything else I’m missing?
I would think that you could get an answer by reading the solution to this question: internal string encoding
.
By utilizing
Reponse.Codepageyou can affect how posted variables are interpreted. And as I understand you can then switch back to wichever encoding you like.[Update]
Because you are using an iframe it is the browser that handles the encoding when sending the request back to the server. And the browser (as I understand) sends the data in the same encoding as the originating page. So if page A that contains the iframe has the charset=Korean I believe that data is sent using Korean encoding.
Is the charset defined in the html tag on page A? If not, add it and then try to use the same in page B.
Also, as “테스트” is a string literal that is affected of the FILE-encoding, make sure to save the asp-file in the appropiate encoding.