summaryrefslogtreecommitdiffstats
path: root/content/posts/Spigot服务端控制台中文乱码解决方案.md
diff options
context:
space:
mode:
authoryingyu5658 <i@yingyu5658.me>2025-12-13 08:33:08 +0800
committeryingyu5658 <i@yingyu5658.me>2025-12-13 08:33:08 +0800
commit1e5f8eb33bc41cb59faf059e83701152785cabea (patch)
tree45867273ac2178285be840764f7962d2b55556c6 /content/posts/Spigot服务端控制台中文乱码解决方案.md
downloadblog-1e5f8eb33bc41cb59faf059e83701152785cabea.tar.gz
blog-1e5f8eb33bc41cb59faf059e83701152785cabea.zip
Initial commit
Diffstat (limited to 'content/posts/Spigot服务端控制台中文乱码解决方案.md')
-rw-r--r--content/posts/Spigot服务端控制台中文乱码解决方案.md34
1 files changed, 34 insertions, 0 deletions
diff --git a/content/posts/Spigot服务端控制台中文乱码解决方案.md b/content/posts/Spigot服务端控制台中文乱码解决方案.md
new file mode 100644
index 0000000..f0bc53c
--- /dev/null
+++ b/content/posts/Spigot服务端控制台中文乱码解决方案.md
@@ -0,0 +1,34 @@
+---
+CopyRight: true
+NoCover: true
+ShowReward: false
+ShowToc: show
+abbrlink: 4161445720
+author: yingyu5658
+categories:
+- 往昔
+cid: 181
+cover: images\2024\12\2743265221.jpg
+date: "2025-01-04 08:35:00"
+desc: null
+keywords: null
+layout: post
+showTimeWarning: true
+slug: 181
+status: publish
+summaryContent: null
+tags:
+- Java
+- 服务器
+- Minecraft
+thumb: null
+title: Spigot服务端控制台中文乱码解决方案
+updated: 2025/01/04 08:35:54
+---
+1. 把``-Dfile.encoding=UTF-8``加在开服脚本文件的``-jar``前即可。
+2. 在启动脚本第一行加上`chcp 65001`
+我的启动脚本如下:
+```bash
+chcp 65001
+java -Dfile.encoding=UTF-8 -jar spigot-1.21.jar
+```