I write out a variable on the asp page:
name="ända"
response.write name
It shows ända
on the page, good!
When inserting it into the database, the value written to the database is ända
The page is encoded with <%Response.charset="iso-8859-1"%>
How can I get this value ända
to be written to the database?
<%Response.charset="iso-8859-1"%>
folderName=request.querystring("foretagsnamn")
folderName = replace(folderName, "å" , "a")
folderName = replace(folderName, "ä" , "a")
folderName = replace(folderName, "ö" , "o")
folderName = replace(folderName, "Å" , "a")
folderName = replace(folderName, "Ä" , "a")
folderName = replace(folderName, "Ö" , "o")
folderName = LCase(folderName)
response.write folderName
And then just a sql insert to the database.
sql="INSERT INTO users(folderName) VALUES('"&folderName&"');"
conn.execute(sql)
Its a mySql database, classic asp.
The querystring comes from a creditcard payment service, and the strange thing is that when I perform a transaction and I resive the querystring, it is wrong, but if I then just update the page so it runs the code and querystring again, it is right!?