Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm having trouble copying files with UTF-8 characters using pscp on Windows. I'm using command line for that and following command:

chcp 65001
pscp -scp -p -pw {pass} -batch "user@remote_host:/Справочник/file.txt" "E:\Справочник\file.txt"
scp: E:/??????????/file.txt: Cannot create file

As shown I get scp: E:/??????????/file.txt: Cannot create file error. How can I transfer files with UTF-8 characters in their path?

share|improve this question
    
Уберите из пути ? Not use in path ? chcp 866 –  STTR Jun 16 at 12:01
    
I have to work with all characters, not only Cyrillic. –  lucek Jun 16 at 12:25
    
Use Lucida console fonts and chcp 65001 –  STTR Jun 16 at 12:39

1 Answer 1

Application registry setting UTF-8 font (example:cmd)

Use path to pscp

Way-1, powershell:

Application path, change \ to _:

AppUTF8Font.ps1:

$app='.\%SystemRoot%_system32_cmd.exe'
SL HKCU:\Console;NI $app;SL $app

New-ItemProperty . FaceName -t STRING -va "Lucida Console"
New-ItemProperty . FontFamily -t DWORD -va 0x00000036

enter image description here

Need allow local powershell script:

powershell -command "Set-ExecutionPolicy RemoteSigned"

And run:

powershell .\AppUTF8Font.ps1

Way-2, reg-file:

Or use reg-file:

REGEDIT4

[HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe]
"FaceName"="Lucida Console"
"FontFamily"=dword:00000036

Command line:

REG IMPORT Cmd_UTF8.reg

Delete setting reg-file:

REGEDIT4

[-HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe]

Command line:

REG IMPORT Cmd_UTF8_Delete.reg
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.