garbled characters appear on the jsp page: (Recommended: java video tutorial)
Question: Developers developing jsp should have good coding awareness, jsp The top should first clarify what the encoding is?
Solution: Add the following statement at the top of the page
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
Html Chinese garbled code:
Problem: The main reason for garbled code in htmll is that the Chinese text content in the html source code is inconsistent with Caused by different html encoding. The encoding of the web page is gbk, while the Chinese one is utf-8;
Solution: Add the following code to the top of the page93f0f5c25f18dab9d176bd4f6de5d30e......9c3bca370b5104690d9ef395f2c5f8d1
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
For more java knowledge, please pay attention to the java basic tutorial column.
The above is the detailed content of Solution to garbled code in java jsp page. For more information, please follow other related articles on the PHP Chinese website!