Skip to content

Nuface Blog

隨意隨手記 Casual Notes

Menu
  • Home
  • About
  • Services
  • Blog
  • Contact
  • Privacy Policy
  • Login/Logout
Menu

Linux 中調整顯示語系

Posted on 2025-10-302025-10-30 by Rico

升級到 Ubuntu 24 之後,Vim 顯示中文亂碼。
原因通常是「終端機編碼 / Vim 編碼設定不一致」,Ubuntu 22 → 24 預設 locale 可能被重置成 C 或 POSIX,不是 UTF-8。

🔍 排查步驟

1. 看系統 locale

locale

如果看到類似:

LANG=C
LC_ALL=

那就不是 UTF-8。

Ubuntu 24 預設應該是:

LANG=zh_TW.UTF-8

或至少是 en_US.UTF-8。


2. 修正 locale

如果缺中文 locale,先裝:

sudo apt update
sudo apt install language-pack-zh-hant

設定環境:

sudo update-locale LANG=zh_TW.UTF-8

登出再登入,或直接測:

export LANG=zh_TW.UTF-8
export LC_ALL=zh_TW.UTF-8

Recent Posts

  • Enterprise AI Platform – AI Security Architecture: Protecting More Than Just the Model
  • 企業 AI 平台-AI Security Architecture:當企業導入 AI,真正需要保護的不只是模型
  • 企業 AI 不只是 LLM:打造高品質 RAG 知識庫的架構與最佳實務
  • Enterprise AI Beyond a Single Agent: Designing an Agent-to-Agent (A2A) Architecture
  • 當企業 AI 不再只有一個 Agent:談 A2A(Agent to Agent)架構

Recent Comments

  1. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on High Availability Architecture, Failover, GeoDNS, Monitoring, and Email Abuse Automation (SOAR)
  2. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on MariaDB + PostfixAdmin: The Core of Virtual Domain & Mailbox Management
  3. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on Daily Operations, Monitoring, and Performance Tuning for an Enterprise Mail System
  4. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on Final Chapter: Complete Troubleshooting Guide & Frequently Asked Questions (FAQ)
  5. Building a Complete Enterprise-Grade Mail System (Overview) - Nuface Blog on Network Architecture, DNS Configuration, TLS Design, and Postfix/Dovecot SNI Explained

Archives

  • July 2026
  • June 2026
  • February 2026
  • January 2026
  • December 2025
  • November 2025
  • October 2025

Categories

  • AI
  • Apache
  • CUDA
  • Cybersecurity
  • Database
  • DNS
  • Docker
  • Fail2Ban
  • FileSystem
  • Firewall
  • Lean
  • Linux
  • LLM
  • Mail
  • MIS
  • N8N
  • OpenLdap
  • OPNsense
  • PHP
  • Python
  • QoS
  • Samba
  • Switch
  • Virtualization
  • VPN
  • VSM
  • WordPress
© 2026 Nuface Blog | Powered by Superbs Personal Blog theme