search
HomeJavaJavaBaseWhat to do if java utf-8 garbled characters

What to do if java utf-8 garbled characters

What should I do if java utf-8 is garbled?

1. Write the following code in the first part of html:

Recommended tutorial: "java learning"

<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>

The example is as follows:

<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>


<script>
</script>
login.jsp


姓名:
密码:

If unsuccessful,

2. Modify the properties of the garbled project file. The garbled code is as shown in the figure.

<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    


  login.jsp


     
濮撳悕锛�
瀵嗙爜锛�

Right-click the login.jsp under the project and select the bottom Properties

What to do if java utf-8 garbled characters

Select Other and change to utf-8

What to do if java utf-8 garbled characters

Click Apply, OK

If unsuccessful,

3. Right-click the project and perform the above operations

What to do if java utf-8 garbled characters

If it still fails,

4. Right-click the garbled file under the project,

What to do if java utf-8 garbled characters

Click on the pattern in the red box to find the original file (you can also find the original file on my computer)

What to do if java utf-8 garbled characters

Open with Edit with Notepad

What to do if java utf-8 garbled characters

Click encoding, select "Use UTF-8 encoding", and then save

What to do if java utf-8 garbled characters

In addition to the above four types, you can also select Properties under Project to modify properties as shown below

What to do if java utf-8 garbled characters

##

The above is the detailed content of What to do if java utf-8 garbled characters. 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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor