Read data code from the access database, garbled in Firefox, ie no problem

Read data code from the access database, garbled in Firefox, ie no problem (computer is only IE6).

The garbled was found in 2 cases

[1]At the beginning of the Firefox normally, refresh a few pages garbled.
[2]Click submit in Firefox, information in the frames, instantly become garbled, commit not to go, but in IE6 no problem, everything was normal.

Last modified code.
<!--#include file="../Data/conn.asp"-->
<!--#include file="../Include/function.asp"-->
	if session("Admin")="" then
		call ShowMsg("Illegal logging","login.asp")
	end if
	dim rs,sql,title,content,fatime,editid

	if request.form("submit") = "Modify information" then
		id = session("id")
		title = request.form("title")
		content = request.form("content")
		fatime = now()
		'The title => cannot be empty and not less than 4, not more than 100
		if len(title) <4 or len(title) > 100 then
			call ShowMsg("The title is not less than 4, or more than 100","")
		end if
		'Content abstract
		if len(content) <10 or len(content) > 200 then
			call ShowMsg("The content may not be less than 10, greater than 200","")
		end if 
		'Began to implement the modify command
		updatesql = "update fawen set title='"&title&"',content='"&content&"',fatime='"&fatime&"' where ID="&id
		call ShowMsg("Modified","index.asp")
	end if
	'Verification over ID is not illegal operation behavior
	editid =CheckNum(request.querystring("edit"))
	set rs = server.createobject("adodb.recordset")
	sql = "select * from fawen where ID="&editid sql,conn,1,1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Modify file</title>

<div class="iframeBody">
<h2>Modify file</h2>
<form name="form1" method="post" action="">
	<p><label for="title">Title: </label><input name="title" type="text" id="title" size="50" value="<%=rs("title")%>"></p>
	<p><label for="content">Content: </label><textarea name="content" cols="90" rows="15" id="content"><%=rs("content")%></textarea></p>
	<input name="submit" type="submit" value="Modify information">
	call close_rs
	call close_conn

Started by Maximilian at November 07, 2016 - 7:13 PM

Notepad to open the file, save as, coding UTF-8 try

Posted by Burton at November 18, 2016 - 8:06 PM

No use ah

Posted by Maximilian at November 20, 2016 - 8:43 PM

Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"
Response.ContentType = "text/html"
Response.Charset = "utf-8"

Posted by Jeffery at December 05, 2016 - 9:08 PM

There is no use

Posted by Maximilian at December 17, 2016 - 9:12 PM

<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>

Posted by Hugo at December 22, 2016 - 9:31 PM

The above 2 removed

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Change GB2312

Have a look

Posted by Jim at December 24, 2016 - 10:04 PM

Coding problem. . .
Browse products are generally GB2312
You are the inside of the data value is UTF-8
Of course, you want a garbled.

Posted by Jerry at December 25, 2016 - 10:10 PM