isHarryh / Ark-Pets

Arknights Desktop Pets | 明日方舟桌宠
https://arkpets.harryh.cn
GNU General Public License v3.0
519 stars 33 forks source link

[Exception] 启动器界面文本乱码 #31

Closed itscpj closed 1 year ago

itscpj commented 1 year ago

版本v2.0.1安装简体中文和English两种语言版本后 使用exe安装后应用界面乱码。
此为图片链接:https://imgse.com/i/p9cfVUg

p9cfVUg.png

isHarryh commented 1 year ago

乱码问题罕见,之前遇到过一个用户也是乱码:

-221e85888b04a436.jpg

但他的乱码情况和你的不一样。

isHarryh commented 1 year ago

已发布临时测试版本v2.1.0-beta,通过显式指定 JavaFX 字体尝试解决乱码问题。请你下载并尝试是否解决。

itscpj commented 1 year ago

已发布临时测试版本v2.1.0-beta,通过显式指定 JavaFX 字体尝试解决乱码问题。请你下载并尝试是否解决。

没有,还是和之前一样

Aloento commented 1 year ago

你把这个页面截个图 image

另见:进入 Region Settings 页面的方法

itscpj commented 1 year ago

https://imgse.com/i/p92Ylfe 我没勾选UTF-8,编码是GBK

p92Ylfe.png

isHarryh commented 1 year ago

https://imgse.com/i/p92Ylfe 我没勾选UTF-8,编码是GBK

p92Ylfe.png

你的区域设置是正确的。现在我已重新上传v2.1.0-beta的程序文件,请你重新安装后,将日志等级调为DEBUG,然后发出你的desktop.log日志,以检查 Java 编码问题。

itscpj commented 1 year ago
# *** ArkPets Log - desktop (PID37292) ***
# Created: 2023-05-17 22:15:09,340
# OS: Windows 11 (amd64)
# Java version: 17.0.7
# Working directory: D:\ArkPets

22:15:09,376 [INFO] Config: Default config was copied successfully.
22:15:09,516 [INFO] System: Entering the app of DesktopLauncher
22:15:10,837 [INFO] Launcher: Initializing (JavaFX 20-ea, ArkPets 2.1.0)
22:15:10,842 [INFO] Launcher: Initialized
22:15:11,807 [INFO] Network: Downloading https://arkpets.harryh.cn/p/arkpets/client/api.php?type=queryVersion&cliVer=2.1.0&source=auto to temp/ApiQueryVersionCache
22:15:12,169 [WARN] ModelManager: Failed to initialize model dataset due to file not found. (models_data.json (系统找不到指定的文件。))
22:15:12,174 [INFO] ModelManager: Search "" (0)
22:15:12,206 [INFO] ModelManager: Reloaded
22:15:13,475 [INFO] Network: Downloaded temp/ApiQueryVersionCache , file size: 181
22:15:13,476 [INFO] Checker: Application version check finished
isHarryh commented 1 year ago
# *** ArkPets Log - desktop (PID37292) ***
# Created: 2023-05-17 22:15:09,340
# OS: Windows 11 (amd64)
# Java version: 17.0.7
# Working directory: D:\ArkPets

22:15:09,376 [INFO] Config: Default config was copied successfully.
22:15:09,516 [INFO] System: Entering the app of DesktopLauncher
22:15:10,837 [INFO] Launcher: Initializing (JavaFX 20-ea, ArkPets 2.1.0)
22:15:10,842 [INFO] Launcher: Initialized
22:15:11,807 [INFO] Network: Downloading https://arkpets.harryh.cn/p/arkpets/client/api.php?type=queryVersion&cliVer=2.1.0&source=auto to temp/ApiQueryVersionCache
22:15:12,169 [WARN] ModelManager: Failed to initialize model dataset due to file not found. (models_data.json (系统找不到指定的文件。))
22:15:12,174 [INFO] ModelManager: Search "" (0)
22:15:12,206 [INFO] ModelManager: Reloaded
22:15:13,475 [INFO] Network: Downloaded temp/ApiQueryVersionCache , file size: 181
22:15:13,476 [INFO] Checker: Application version check finished

诶,我忘了你乱码没法在启动器调日志等级。
请打开安装目录下的ArkPetsConfig.json,将字段logging_levelINFO改为大写DEBUG,保存后再启动启动器,然后再发送新的desktop.log日志。

itscpj commented 1 year ago
# *** ArkPets Log - desktop (PID30704) ***
# Created: 2023-05-18 19:24:20,962
# OS: Windows 11 (amd64)
# Java version: 17.0.7
# Working directory: D:\ArkPets

19:24:21,906 [INFO] System: Entering the app of DesktopLauncher
19:24:26,333 [INFO] Launcher: Initializing (JavaFX 20-ea, ArkPets 2.1.0)
19:24:26,334 [DEBUG] Launcher: Property file.encoding = GBK
19:24:26,334 [DEBUG] Launcher: Property sun.jnu.encoding = GBK
19:24:26,334 [DEBUG] Launcher: Default charset = GBK
19:24:26,378 [INFO] Launcher: Initialized
19:24:28,605 [INFO] Network: Downloading https://arkpets.harryh.cn/p/arkpets/client/api.php?type=queryVersion&cliVer=2.1.0&source=auto to temp/ApiQueryVersionCache
19:24:29,096 [WARN] ModelManager: Failed to initialize model dataset due to file not found. (models_data.json (系统找不到指定的文件。))
19:24:29,098 [INFO] ModelManager: Search "" (0)
19:24:29,128 [INFO] ModelManager: Reloaded
19:24:31,095 [INFO] Network: Downloaded temp/ApiQueryVersionCache , file size: 183
19:24:31,096 [INFO] Checker: Application version check finished
19:24:46,155 [INFO] System: Exited from DesktopLauncher successfully
isHarryh commented 1 year ago
# *** ArkPets Log - desktop (PID30704) ***
# Created: 2023-05-18 19:24:20,962
# OS: Windows 11 (amd64)
# Java version: 17.0.7
# Working directory: D:\ArkPets

19:24:21,906 [INFO] System: Entering the app of DesktopLauncher
19:24:26,333 [INFO] Launcher: Initializing (JavaFX 20-ea, ArkPets 2.1.0)
19:24:26,334 [DEBUG] Launcher: Property file.encoding = GBK
19:24:26,334 [DEBUG] Launcher: Property sun.jnu.encoding = GBK
19:24:26,334 [DEBUG] Launcher: Default charset = GBK
19:24:26,378 [INFO] Launcher: Initialized
19:24:28,605 [INFO] Network: Downloading https://arkpets.harryh.cn/p/arkpets/client/api.php?type=queryVersion&cliVer=2.1.0&source=auto to temp/ApiQueryVersionCache
19:24:29,096 [WARN] ModelManager: Failed to initialize model dataset due to file not found. (models_data.json (系统找不到指定的文件。))
19:24:29,098 [INFO] ModelManager: Search "" (0)
19:24:29,128 [INFO] ModelManager: Reloaded
19:24:31,095 [INFO] Network: Downloaded temp/ApiQueryVersionCache , file size: 183
19:24:31,096 [INFO] Checker: Application version check finished
19:24:46,155 [INFO] System: Exited from DesktopLauncher successfully

运行时日志中输出的字符集属性都是正常的(GBK),现在我们正在调查其他原因。

值得注意的是,在你的程序界面中,字符编码似乎被全部右移了 3 个字符。例如: A -> D r -> u k -> n

Update:
感觉类似于凯撒加密。请你回忆一下电脑有没有出现过奇怪的现象,安装过特别的软件,调整过特别的设置?

isHarryh commented 1 year ago

乱码问题罕见,之前遇到过一个用户也是乱码:

-221e85888b04a436.jpg

但他的乱码情况和你的不一样。

经过排查,这个用户是因为将系统字体 微软雅黑 的字体文件替换掉了导致的乱码问题。
你是否也有过类似的设置修改?

itscpj commented 1 year ago

乱码问题罕见,之前遇到过一个用户也是乱码: -221e85888b04a436.jpg 但他的乱码情况和你的不一样。

经过排查,这个用户是因为将系统字体 微软雅黑 的字体文件替换掉了导致的乱码问题。 你是否也有过类似的设置修改?

是的,替换成了新雅黑(Y轴抗锯齿版本)

isHarryh commented 1 year ago

现在已将OTF字体文件(思源黑体 Source Han Sans CN)内置到程序资源中,使其不再使用系统默认字体。

我已重新上传v2.1.0-beta的程序文件,请你重新安装,并验证是否解决。

itscpj commented 1 year ago

现在已将OTF字体文件(思源黑体 Source Han Sans CN)内置到程序资源中,使其不再使用系统默认字体。

我已重新上传v2.1.0-beta的程序文件,请你重新安装,并验证是否解决。

问题已解决,界面不再乱码