Skip to content

Nuface Blog

隨意隨手記 Casual Notes

Menu
  • Home
  • About
  • Services
  • Blog
  • Contact
  • Privacy Policy
  • Login
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

  • Postfix + Let’s Encrypt + BIND9 + DANE Fully Automated TLSA Update Guide
  • Postfix + Let’s Encrypt + BIND9 + DANE TLSA 指紋自動更新完整教學
  • Deploying DANE in Postfix
  • 如何在 Postfix 中部署 DANE
  • DANE: DNSSEC-Based TLS Protection

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

  • December 2025
  • November 2025
  • October 2025

Categories

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