Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Windows 7 CMD 輸入中文顯示亂碼?CHCP 936 切換代碼頁解決

編輯:Win7 系統應用技巧

命令提示字元 (CMD) 輸入/顯示中文變亂碼,主因代碼頁非 936 (繁體中文 Big5/CP950 環境下亦適用)。一行指令切換代碼頁即可修復。

修復步驟

  1. 開啟 CMD → 輸入 chcp 936 → Enter。
  2. 顯示 作用中的字碼頁: 936 即成功。
  3. 若仍顯示方塊字元,右鍵 CMD 標題列 →「預設值」→「選項」→「字型」選「新細明體」或「Microsoft JhengHei」→「預設字碼頁」設 936 → 確定。

chcp 65001 切換至 UTF-8 亦可顯示中文,但部分舊版指令相容性較差。建議預設使用 936,需 UTF-8 時臨時切換。

Copyright © Windows教程網 All Rights Reserved