java garbled code, divided into garbled codes in several positions. (Recommendation: java video tutorial)
1. It is a garbled problem on the JSP page.
Solution:
<%@ page language="java" contentType="text/html; charset=UTF-8"pageEncoding="UTF-8"%>
2. Transmit characters from the background to the front end String garbled code
Solution:
response.setContentType("text/html;charset=UTF-8"); response.setCharacterEncoding("UTF-8");
3. Garbled code problem when Ajax asynchronously transfers parameters
Solution:
contentType:"application/x-www-form-urlencoded; charset=utf-8",
4.myEclips or Garbled characters when Eclips opens the file
Solution: Right-click the file-porperties-Adjust the file to UTF-8 format
For more java knowledge, please pay attention tojava basics Tutorial column.
The above is the detailed content of Solution to java garbled code problem. For more information, please follow other related articles on the PHP Chinese website!