convertir utf-8 a iso-8859-1 en asp clásico
Mi sitio ahora funciona únicamente en UTF-8, pero para enviar un SMS utilizando serverXMLHTTP, necesito convertir mi mensaje de UTF-8 hasta ISO-8859-1 antes de enviarlo.
La situación es paralela a esto:
a.asp:
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body>
<form method="post" action="b.asp">
<input type text name="message" value="æøå and ÆØÅ"><br>
<input type=submit>
</body>
y luego b.asp
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head><body>
<%=konvert(request("message"))%><br>
</body>
<%
Function Konvert(sIn)
Dim oIn : Set oIn = CreateObject("ADODB.Stream")
oIn.Open
oIn.CharSet = "UTF-8"
oIn.WriteText sIn
oIn.Position = 0
oIn.CharSet = "ISO-8859-1"
Konvert = oIn.ReadText
oIn.Close
End Function
%>
En este escaparate esperaría ver la misma cadena en b.asp cuando envío i a.asp, pero lo que obtuve en esto:
æøå and ÆØÅ
¿Algunas ideas?