Skip to content

Commit b29977e

Browse files
authored
Merge pull request #6019 from PCL-Community/fix#6000
fix(ModLaunch): 启动脚本乱码
2 parents e51a5cb + 7cc3595 commit b29977e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Plain Craft Launcher 2/Modules/Minecraft/ModLaunch.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2095,7 +2095,7 @@ IgnoreCustomSkin:
20952095
'输出 bat
20962096
Try
20972097
Dim CmdString As String =
2098-
$"{If(McLaunchJavaSelected.VersionCode > 8, "chcp 65001>nul" & vbCrLf, "")}" &
2098+
$"{If(McLaunchJavaSelected.VersionCode > 8 AndAlso McLaunchJavaSelected.VersionCode < 18, "chcp 65001>nul" & vbCrLf, "")}" &
20992099
"@echo off" & vbCrLf &
21002100
$"title 启动 - {McVersionCurrent.Name}" & vbCrLf &
21012101
"echo 游戏正在启动,请稍候。" & vbCrLf &
@@ -2107,7 +2107,7 @@ IgnoreCustomSkin:
21072107
"echo 游戏已退出。" & vbCrLf &
21082108
"pause"
21092109
WriteFile(If(CurrentLaunchOptions.SaveBatch, Path & "PCL\LatestLaunch.bat"), SecretFilter(CmdString, "F"),
2110-
Encoding:=If(Encoding.Default.Equals(Encoding.UTF8), Encoding.UTF8, Encoding.GetEncoding("GB18030")))
2110+
Encoding:=If(McLaunchJavaSelected.VersionCode > 8, Encoding.UTF8, Encoding.Default))
21112111
If CurrentLaunchOptions.SaveBatch IsNot Nothing Then
21122112
McLaunchLog("导出启动脚本完成,强制结束启动过程")
21132113
AbortHint = "导出启动脚本成功!"

0 commit comments

Comments
 (0)