S
S
sbh2015-04-22 03:31:50
PowerShell
sbh, 2015-04-22 03:31:50

How to create a file with a Russian name in PowerShell?

Actually a question.
I create the file with the following command:
New-Item -Path D:\TEST\HELLO.txt -ItemType "file"
The file is created but with bugs.
Tried to do chcp 1251
Did not help.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2015-04-22
@edinorog

It seems like you need to score on this problem. there still the coding can be changed only for an active session. full sadness =)

A
ApeCoder, 2015-04-30
@ApeCoder

On Win 10, it is created from under powershell ISE and ConEmu. Not enough data to play - OS version, what console are you using, or is the text written to the file?

I
Ivan Arxont, 2015-04-22
@arxont

What if you try like this?

New-Item -Path D:\TEST\$([char]0x041F)$([char]0x0440)$([char]0x0438)$([char]0x0432)$([char]0x0435)$([char]0x0442).txt -ItemType "file"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question