idea build console display Chinese in garbled code
Answered
when run "gradle build" in terminal, Chinese characters are display correctly. But if I double click gradle build task in right panel, these characters are displayed in garbled code.
Please sign in to leave a comment.
Make sure IntelliJ IDEA has the same file encodings with your terminal may solve this problem.
You can set Intellij IDEA's file encodings here:
Help | Edit Custom VM Options
replace UTF-8 with whatever file encodings you see in you Windows Terminal Settings.
"-Dfile.encoding=UTF-8" solve the problem. Thank you.
IntelliJ IDEA 2021.3 has the same problem,but -Dfile.encoding=UTF-8 did not solve my problem
Liu Pei Pei I need help 😭
@547913250 After adding it, you need to restart the IDE to make it work. Have you tried to restart the IDEA?
I restarted but it didn't take effect
Lejia Chen Plus this seems to be effective for maven but not for gradle
Lejia Chen Is there a problem with the 2021.3 version of the gradle plugin?
Lejia Chen I even restarted my computer but it still doesn’t work
@547913250 Please share a screenshot of the full IDE windows including that garbled code and the IDE log file from IDE main menu `Help | Show Log in ...`. You could upload them here https://uploads.jetbrains.com/ and share me the upload id.
Lejia Chen Upload id: 2021_12_22_SSEJSP6dmZqFinML (files: idea error.png, idea.log)
@547913250 Can you share the full IDE log (idea.log)? You could delete the idea.log, restart the IDE, share the new log file if you are worried about any sensitive info there.
Lejia Chen Upload id: 2021_12_23_4h5ZgwNif9SJYekY (file: idea.log)
Please follow the https://youtrack.jetbrains.com/issue/IDEA-219115
Answered in another thread.