You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VuePress入门教程运行出现乱码问题求助

Fixing VuePress Garbled Text on Windows 10 with Node.js v8.11.4

Hey there, I’ve run into similar encoding headaches with VuePress on Windows before—let’s get this sorted out for you. The garbled output like ��#� �H�e�l�l�o� �V�u�e�P�r�e�s�s� is almost always tied to a mismatch between VuePress’s UTF-8 encoding and your Windows terminal’s default GBK setting. Here’s how to fix it step by step:

1. Quick Temporary Fix: Switch PowerShell to UTF-8

Open your PowerShell and run this command first to flip the terminal to UTF-8 encoding:

chcp 65001

Then re-run your VuePress dev command:

vuepress dev

This should clear up the garbled text right away for your current session.

2. Permanent Fix: Set PowerShell to Use UTF-8 by Default

If you don’t want to run that chcp command every time, set PowerShell to default to UTF-8:

  • Right-click the PowerShell title bar and select Properties (or Settings on newer Windows 10 builds)
  • Head to the Terminal or Options tab (depending on your Windows version)
  • Find the Encoding dropdown and pick UTF-8
  • Save changes and restart PowerShell

3. Verify Your Markdown Files Are UTF-8 Encoded

Double-check your content files (like README.md) are saved with UTF-8:

  • Open the file in Notepad
  • Go to File > Save As
  • In the encoding dropdown, select UTF-8
  • Overwrite the original file

4. (Optional) Upgrade Node.js (If You’re Open to It)

While Node.js v8.11.4 meets VuePress 1.x’s minimum requirements, older Node versions can have edge-case encoding bugs. If the above steps don’t work, consider upgrading to Node.js v12 or later—it’s free and simple, and might eliminate version-related quirks.

Try these steps in order—most users fix the problem with just the first two!

内容的提问来源于stack exchange,提问作者Randy Hall

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.06 16:52:31