OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Displaying Unicode in PowerShell

  • Thread starter Thread starter Dhiwakar Ravikumar
  • Start date Start date
D

Dhiwakar Ravikumar

Guest
What I'm trying to achieve should be rather straightforward although PowerShell is trying to make it hard.

I want to display the full path of files, some with Arabic, Chinese, Japanese and Russian characters in their names.

I always get some undecipherable output, such as the one shown below:

Enter image description here

The output seen in the console is being consumed as is by another script. The output contains ? instead of the actual characters.

The command executed is

Code:
(Get-ChildItem -Recurse -Path "D:\test" -Include *unicode* | Get-ChildItem -Recurse).FullName

Is there an easy way to launch PowerShell (via the command line or in a fashion that can be written into a script) such that the output is seen correctly?

P.S. I've gone through many similar questions on Stack Overflow, but none of them have much input other than calling it a Windows Console Subsystem issue.
<p>What I'm trying to achieve should be rather straightforward although PowerShell is trying to make it hard.</p>
<p>I want to display the full path of files, some with Arabic, Chinese, Japanese and Russian characters in their names.</p>
<p>I always get some undecipherable output, such as the one shown below:</p>
<p><a href="https://i.sstatic.net/ghy94.png" rel="noreferrer"><img src="https://i.sstatic.net/ghy94.png" alt="Enter image description here" /></a></p>
<p>The output seen in the console is being consumed as is by another script. The output contains <em>?</em> instead of the actual characters.</p>
<p>The command executed is</p>
<pre class="lang-none prettyprint-override"><code>(Get-ChildItem -Recurse -Path "D:\test" -Include *unicode* | Get-ChildItem -Recurse).FullName
</code></pre>
<p>Is there an easy way to launch PowerShell (via the command line or in a fashion that can be written into a script) such that the output is seen correctly?</p>
<p>P.S. I've gone through many similar questions on Stack Overflow, but none of them have much input other than calling it a Windows Console Subsystem issue.</p>
Continue reading...
 

Latest posts

B
Replies
0
Views
1
Blundering Ecologist
B
Top