konvertiere utf-8 nach iso-8859-1 in klassisches asp
Meine Site funktioniert jetzt rein in UTF-8, aber um eine SMS mit serverXMLHTTP zu senden, muss ich meine Nachricht vor dem Senden von UTF-8 auf ISO-8859-1 konvertieren.
Die Situation ist parallel dazu:
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>
und dann 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
%>
In diesem Schaufenster würde ich erwarten, den gleichen String in b.asp zu sehen, wie ich i a.asp sende, aber was ich bekomme, ist folgender:
æøå and ÆØÅ
Irgendwelche Ideen?