aboutsummaryrefslogtreecommitdiffstats
path: root/content/posts/Spigot服务端控制台中文乱码解决方案.md
blob: f0bc53c13615a648e94b3530364971b064776527 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
```