Answer the question
In order to leave comments, you need to log in
How to set subprocess.Popen encoding?
Good afternoon! From under Windows, I send csv'xy to a third-party application using:
proc = subprocess.Popen(['powershell', 'cat ' + confCSV + ' | clickhouse-cli --host=' + confClick + ' --query="INSERT INTO ' + confDb + ' FORMAT CSV"'])
proc.wait()
Answer the question
In order to leave comments, you need to log in
Add first command to PoSH
[Console]::OutputEncoding = New-Object -typename System.Text.UTF8Encoding;
or& "$env:windir\system32\chcp.com" 65001;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question