Commit dc984599 authored by Elizaveta Shashkova's avatar Elizaveta Shashkova Committed by intellij-monorepo-bot
Browse files

IJ-CR-28089 PY-55369 Wrong encoding in the console output

Always set default charset during execution

(cherry picked from commit 64c287bfc2621c6b9b3bf297a65f7a53bff8a6de)

GitOrigin-RevId: e1908493d7b9d934b851f0c2e25dbddd57a75742
parent ac8260f1
Showing with 3 additions and 5 deletions
+3 -5
......@@ -641,10 +641,7 @@ public abstract class PythonCommandLineState extends CommandLineState {
TargetEnvironmentRequest targetEnvironmentRequest = helpersAwareTargetRequest.getTargetEnvironmentRequest();
PythonScripts.extendEnvs(commandLine, map, targetEnvironmentRequest.getTargetPlatform());
Charset charset = commandLine.getCharset();
if (charset != null) {
setupEncodingEnvs(commandLine, charset);
}
setupEncodingEnvs(commandLine, commandLine.getCharset());
buildPythonPath(project, commandLine, runParams, pathMapper, isDebug, targetEnvironmentRequest);
......
......@@ -3,6 +3,7 @@ package com.jetbrains.python.run
import com.intellij.execution.target.value.TargetEnvironmentFunction
import com.intellij.execution.target.value.constant
import com.intellij.openapi.vfs.encoding.EncodingManager
import org.jetbrains.annotations.ApiStatus
import java.io.File
import java.nio.charset.Charset
......@@ -18,7 +19,7 @@ sealed class PythonExecution {
val envs: MutableMap<String, TargetEnvironmentFunction<String>> = mutableMapOf()
var charset: Charset? = null
var charset: Charset = EncodingManager.getInstance().defaultCharset
var inputFile: File? = null
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment