Problems with encoding UTF-8 in Powershell
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- powershell
- 領域
- tooling
調査の方向性
Start with PowershellSyntax.sublime-settings and reproduce the UTF-8 and UTF-8 with BOM behavior on Windows with the UTF-8 beta feature disabled. Check the related build-panel behavior and the effect of running chcp.exe; done means an agreed encoding behavior is validated for the affected PowerShell and build workflows, including the compatibility concern for Linux and PowerShell Core users.
索引モデルが issue の本文から書いたものです。
説明
Per default Windows 10 and Windows 11 do not use UTF-8 unless you manually enable as a Beta feature under Region Settings in intl.cpl
Without that setting enabled both Sublime and Powershell are having problems reading and displaying special characters such as "åäö".
Here is an example below on a machine without UTF-8 enabled running files from the Powershell console.
File encoding: UTF-8

File encoding: UTF-8 with BOM
As you can see Powershell is unable read the string when the file encoding is "UTF-8" and everything works fine when the encoding is set to "UTF-8 with BOM".
Here is another example with the Build Panel is Sublime Text
File encoding: UTF-8
File encoding: UTF-8 with BOM
As you can see the output is still wrong in the Build Panel even when the encoding is set to "UTF-8 with BOM". But it can be fixed by running chcp.exe in cmd

And then changing the encoding settings in the build job.

As stated before this is only an issue when the UTF-8 Beta feature in Windows is disabled. If you enable UTF-8 support the Sublime Text build panel and powershell console works without any issues.
I am not sure how to handle the build panel problem but at least changing the default encoding format for Powershell files to "UTF-8 with BOM" would prevent scripts processing special characters from causing unwanted bugs. This could probably be done by updating PowershellSyntax.sublime-settings with "default_encoding": "UTF-8 with BOM". But I am not sure how that would affect Linux or Powershell Core users.
- 主要言語
- PowerShell
- スター
- 335
- フォーク
- 80
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SublimeText/PowerShell のほかの issue
-
tooling
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
SublimeText/PowerShell#226 ·
-
syntax
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
SublimeText/PowerShell#218 · コメント 1 件 ·
-
syntax
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
SublimeText/PowerShell#211 ·
-
build system
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
SublimeText/PowerShell#167 · コメント 2 件 ·
-
autocomplete
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
SublimeText/PowerShell#82 · コメント 6 件 ·
SublimeText/PowerShell の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
use-agent-os/agent-os#3314 ·
-
documentation low-priority templates
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
jesseray718/openroot#87 ·
-
factory-active factory-automatic task-bug-reproduction-cannot-reproduce task-identify-harness-labels-done task-identify-issue-type-done
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
danielmiessler/LifeOS#2218 ·
-
in-progress proposal
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
uibcdf/molsyssuite#36 ·