Tomcat garbled characters in the console in IDEA and how to set IDEA encoding to UTF-8

Tomcat garbled characters in the console in IDEA and how to set IDEA encoding to UTF-8

1. First of all, we need to distinguish between the tomcat log encoding and the idea log display console encoding

2. Tomcat log encoding: In cmd, run "cd /d tomcat root directory" and "bin\catalina.bat run". Use "chcp65001" to switch cmd to utf8, and "chcp 936" to switch cmd to gbk. Determine the tomcat log encoding, which is usually in tomcat/conf/logging.properties

3. IDEA display encoding: Windows uses GBK by default, so IDEA displays GBK encoding by default. [Be sure] to add -Dfile.encoding=UTF-8 in Help-- custom vm options to force utf8 encoding display. Do not change it yourself. The vmoptions may be in the wrong position. IDEA will copy a

insert image description here

insert image description here

4. [Avoid] Changing Tomcat's logging.properties to GBk will cause garbled get/post parameters during debugging

Summarize

This is the end of this article about the garbled characters in Tomcat's console in IDEA and the UTF-8 encoding setting in IDEA. For more related content about the garbled characters in the idea tomcat console in UTF-8, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Idea configures Maven Alibaba Cloud image acceleration
  • Detailed instructions for installing the Alibaba Code Standards plugin in IDEA
  • IntelliJ IDEA Modify the Code Method Steps
  • IntelliJ IDEA unified setting encoding to utf-8 encoding implementation
  • Idea introduces a solution for gb2312 encoded files
  • Detailed explanation of two ways to install Alibaba Coding Standards plug-in in IDEA (online installation and offline installation)

<<:  Detailed explanation of MySQL cumulative calculation implementation method

>>:  js to achieve a simple magnifying glass effect

Recommend

JavaScript immediate execution function usage analysis

We know that in general, a function must be calle...

Why not use UTF-8 encoding in MySQL?

MySQL UTF-8 encoding MySQL has supported UTF-8 si...

JS ES6 asynchronous solution

Table of contents Initially using the callback fu...

How to install openjdk in docker and run the jar package

Download image docker pull openjdk Creating a Dat...

Practical method of deleting associated tables in MySQL

In the MySQL database, after tables are associate...

Summary of MySQL slow log practice

Slow log query function The main function of slow...

How to avoid data loop conflicts when MySQL is configured with dual masters

I wonder if you have ever thought about this ques...

Several ways to center a box in Web development

1. Record several methods of centering the box: 1...

Will the index be used in the MySQL query condition?

When an employer asks you whether an index will b...

Detailed explanation of semiotics in Html/CSS

Based on theories such as Saussure's philosop...

Kali Linux Vmware virtual machine installation (illustration and text)

Preparation: 1. Install VMware workstation softwa...

Install JDK1.8 in Linux environment

Table of contents 1. Installation Environment 2. ...