Home > Java > JavaBase > body text

Solution to java garbled code problem

Release: 2019-12-04 14:31:59
Original
2496 people have browsed it

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"%>
Copy after login

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");
Copy after login

3. Garbled code problem when Ajax asynchronously transfers parameters

Solution:

contentType:"application/x-www-form-urlencoded; charset=utf-8",
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template