I need to write a small script to take the contents of an XLS file and lay them out nicely in a web page. So far, so easy. However, the spreadsheet text will be the content of a series of social media posts which includes emojis within that content. I did a very basic test and found that the emojis turn into question marks when dropped to the page by the script.
I don't particularly like emojis myself but I don't get to choose whether they are included in the text, and they need to appear in the end result.
Here's what a stripped back version of the script looks like, with no formatting etc.
<%@ Language=VBScript%>
<html><head></head>
<body>
<%
Dim objConn, objRS
Set objConn = Server.CreateObject("ADODB.Connection")
filepath = "xls/OPG.xls"
objConn.Open "DRIVER={Microsoft Excel Driver (*.xls)}; IMEX=1; HDR=NO; Excel 8.0; DBQ=" & Server.MapPath(filepath) & "; "
strSQL = "SELECT * FROM A1:C400"
Set objRS=objConn.Execute(strSQL)
Set DataList = CreateObject("ADOR.Recordset")
Do Until objRS.EOF
Response.Write objRS.Fields("Post Description").Value & "<br /><br />"
objRS.MoveNext
Loop
objConn.Close
Set objConn=Nothing
%>
</body>
</html>
Here's what the original XLS file looks like...
...and here's how that comes into the web page...
How do I get around this? Any ideas?
Thanks