question

28549858 avatar image
0 Votes"
28549858 asked 28549858 commented

Output from powershell to cmd

Hi! Pls help. What i must do for right encoding my command from powershell to cmd?

PS C:\WINDOWS\system32> chcp 65001
Active code page: 65001

PS C:\WINDOWS\system32> $OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding

PS C:\WINDOWS\system32> $OutputEncoding


BodyName : utf-8
EncodingName : Unicode (UTF-8)
HeaderName : utf-8
WebName : utf-8
WindowsCodePage : 1200
IsBrowserDisplay : True
IsBrowserSave : True
IsMailNewsDisplay : True
IsMailNewsSave : True
IsSingleByte : False
EncoderFallback : System.Text.EncoderReplacementFallback
DecoderFallback : System.Text.DecoderReplacementFallback
IsReadOnly : True
CodePage : 65001




PS C:\WINDOWS\system32> """C:\\Program Files (x86)\\1cv8\\8.3.18.1520\\bin\\1cv8c.exe"" ENTERPRISE /S""1cdev\Testing"" /N""БелыйА"" /Execute ""C:\\Users\\albelyy\\Desktop\\Конвейер\\СборкаТекстовСценариев.epf"" /C""СобратьСценарии;JsonParams=C:\\Users\\albelyy\\Desktop\\Конвейер\\params.json""" |cmd
Microsoft Windows [Version 10.0.19042.1165]
(c) Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>"C:\\Program Files (x86)\\1cv8\\8.3.18.1520\\bin\\1cv8c.exe" ENTERPRISE /S"1cdev\Testing" /N"������������" /Execute "C:\\Users\\albelyy\\Desktop\\����������������\\������
��������������������������������������.epf" /C"������������������������������;JsonParams=C:\\Users\\albelyy\\Desktop\\����������������\\params.json"

windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RichMatheisen-8856 avatar image
0 Votes"
RichMatheisen-8856 answered 28549858 commented

What is the code page if you run CMD.EXE?

If it's 866 (OEM Russian; Cyrillic (DOS)) you might use that code page instead of 65001. In the USA the default code page is 437.

Also, the font used by CMD.EXE must contain the characters in the string.

This may help: what-encoding-code-page-is-cmd-exe-using


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Really thanks u, it helps

0 Votes 0 ·