powershell and VScode UTF8 encoding issues

tb582 1 Reputation point
2022-07-22T17:23:02.39+00:00

I written a bit of powershell to invoke an app - but oddly the VScode terminal outputs strange characters and also includes them in variables I'm setting; While the app logs external to VSCode are showing the proper characters as I would expect.

I've made sure UTF8 is set in VScode but haven't been able to find the cause of this issue.

I did find a super old post that seems very similar though https://developercommunity.visualstudio.com/t/utf-8-in-output-pane-is-not-displayed-correctly/429447

Here's the current VSCode output:

* My Pictures/Tony/Autom…22-07-13 16-43-54.heic: checking  
 * My Pictures/Tony/Autom…22-07-14 11-03-00.heic: checking  
 * My Pictures/Tony/Autom…22-07-14 11-03-01.heic: checking  

vs the app logs look as expected:

2022/07/22 12:39:38.790860 DEBUG : My Pictures/Tony/Automatic Upload/Tony’s iPhone/2021-12-09 19-36-19.heic: Excluded  
2022/07/22 12:39:38.790860 DEBUG : My Pictures/Tony/Automatic Upload/Tony’s iPhone/2021-12-09 13-52-56.heic: Excluded  
2022/07/22 12:39:38.790860 DEBUG : My Pictures/Tony/Automatic Upload/Tony’s iPhone/2021-12-24 23-41-10.jpeg: Excluded  
2022/07/22 12:39:38.790860 DEBUG : My Pictures/Tony/Automatic Upload/Tony’s iPhone/2021-12-25 09-35-05.jpeg: Excluded  
2022/07/22 12:39:38.790860 DEBUG : My Pictures/Tony/Automatic Upload/Tony’s iPhone/2021-12-25 09-25-11.jpeg: Excluded  

VScode version info:

Version: 1.69.2 (user setup)  
Commit: 3b889b090b5ad5793f524b5d1d39fda662b96a2a  
Date: 2022-07-18T16:12:52.460Z  
Electron: 18.3.5  
Chromium: 100.0.4896.160  
Node.js: 16.13.2  
V8: 10.0.139.17-electron.0  
OS: Windows_NT x64 10.0.19043  
Community Center Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 34,436 Reputation points Microsoft External Staff
    2022-07-25T08:34:24.543+00:00

    Hi @tb582 ,

    Thank you for taking time to post this issue in Microsoft Q&A forum.

    Visual Studio Code(VS Code) and Visual Studio IDE(VS) are two different products, and VS Code is currently not supported in the Microsoft Q&A forums, the supported products are listed over here: https://learn.microsoft.com/en-us/answers/products/

    For the related questions(technical support) about VS Code, you can post here: Stack Overflow tagged Visual Studio Code or here: GitHub – Visual Studio Code.

    Thanks for your understanding.

    Best Regards,
    Tianyu

    • If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.