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

How to modify iTunes backup path under Windows

0. Preparation: • Close iTunes • Kill the service...

Getting Started Guide to Converting Vue to React

Table of contents design Component Communication ...

MySQL sorting using index scan

Table of contents Install sakila Index Scan Sort ...

Issues installing Python3 and Pip in ubuntu in Docker

text 1) Download the Ubuntu image docker pull ubu...

Mysql database index interview questions (basic programmer skills)

Table of contents introduction Indexing principle...

Detailed explanation of how to exit Docker container without closing it

After entering the Docker container, if you exit ...

Example of implementing the Graphql interface in Vue

Note: This article is about the basic knowledge p...

Complete steps to reset the root user password in mysql8

Preface Recently, many new colleagues have asked ...

Understand CSS3 FlexBox elastic layout in 10 minutes

Basic Introduction Features Flexbox is a CSS disp...

CSS example code for setting scroll bar style

The CSS implementation code for setting the scrol...

A brief introduction to the simple use of CentOS7 firewall and open ports

Overview (official has more detailed description)...

How to connect to a remote server and transfer files via a jump server in Linux

Recently, I encountered many problems when deploy...