Home  >  Article  >  Java  >  Solution to java garbled code problem

Solution to java garbled code problem

尚
Original
2019-12-04 14:31:592428browse

Solution to java garbled code problem

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn