コンソールのUTF-8シーケンス

コンソールのUTF-8シーケンス

コンソールで「tree」コマンドを実行すると、次の結果が表示されます。

.
├── Annexe\ 1\ -\ Sch\303\251ma\ global\ de\ la\ base\ de\ donn\303\251es.raw
...

結果はUTF-8シーケンスで構成され、報告された文字列を人間が読める形式で取得する必要があります。この不快なことをどのように変えることができますか?

ベストアンサー1

--charsetスイッチで使用する文字セットを指定できます。

   --charset charset
          Set the character set to use when outputting HTML and for line 
          drawing.

また、次の2つのスイッチが役に立ちます。

   -q     Print non-printable characters in filenames as question marks 
          instead of the default.

   -N     Print non-printable characters as is instead of as escaped octal 
          numbers.

また、次のスイッチを使用して出力を向上させることもできます。

   -A     Turn on ANSI line graphics hack when printing the indentation 
          lines.

   -S     Turn on ASCII line graphics (useful when using Linux console mode 
          fonts). This option is now equivalent to `--charset=IBM437' and 
          may eventually be depreciated.

おすすめ記事