Home > Article > Web Front-end > : Conversion of Chinese character encoding in web pages_html/css_WEB-ITnose
There is an input form on the HTML page encoded as UTF8. After inputting Chinese characters, can the current page be directly converted to GBK and then passed to another GBK page? The action file cannot be modified, and the input page can only be UTF8 encoded.
http://bbs.csdn.net/topics/290070559 Make good use of the search function, you can also go directly to Baidu
1. No matter what the page encoding is, the browser internally processes Unicode
2. I don’t understand the meaning of passing it to another GBK page
For example: URL 1 Input form (UTF8 encoding)
819e011e8b691c1d05b3fb828684428b
c374e6fb094782526fcaa8c87a9493bc
f5a47148e367a6035fd7a2faa965022e
If you want to enter it, directly convert the keyword to GBK on URL 1 and then execute act.jsp on URL 2
function foo() { document.charset = 'gbk';}
<form name=form1 method="post" action="网址二/act.jsp " onsubmit=foo()> <input type="txt" name="keyword" value=""></form>
This method doesn’t work.
Change the action file encoding?
The action file cannot be changed because it is made by the developer
Problem solved, thank you! ! ! !