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
Select Other and change to utf-8
Click Apply, OK
If unsuccessful,
3. Right-click the project and perform the above operations
If it still fails,
4. Right-click the garbled file under the project,
Click on the pattern in the red box to find the original file (you can also find the original file on my computer)
Open with Edit with Notepad
Click encoding, select "Use UTF-8 encoding", and then save
In addition to the above four types, you can also select Properties under Project to modify properties as shown below
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

WebStorm Mac version
Useful JavaScript development tools

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
Easy-to-use and free code editor