ClassicOldSong / Apollo

Sunshine fork
GNU General Public License v3.0
504 stars 13 forks source link

[Issue]: 上传剪贴板中文乱码 #69

Closed hitopo closed 1 month ago

hitopo commented 1 month ago

Describe the bug

Apollo和Artemis都是最新的版本

步骤:

  1. 提前在串流机器上复制中文
  2. 上传剪贴板到被串流PC上
  3. 粘贴

粘贴出来的中文是乱码

串流机器:Android,Redmi note 12 turbo 被串流机器:PC,Windows 11Pro 23H2

Steps to reproduce

6e8b7a8f16d178ae3e52bfa4691ceee

Affected games

No response

Other Moonlight clients

None

Moonlight adjusted settings

None

Moonlight adjusted settings (please complete the following information)

No response

Moonlight default settings

Yes

Gamepad-related connection issue

Yes

Gamepad-related input issue

Yes

Gamepad-related streaming issue

Yes

Android version

Android 12

Device model

Redmi note 12 turbo

Server PC OS version

Windows 11 Pro 23H2

Server PC GeForce Experience version

No response

Server PC Nvidia GPU driver version

No response

Server PC antivirus and firewall software

No response

Screenshots

No response

Relevant log output

No response

Additional context

No response

ClassicOldSong commented 1 month ago

你的Windows是否设置默认使用UTF-8了

ClassicOldSong commented 1 month ago

以及麻烦确认一下获取剪贴板的话中文是否乱码

hitopo commented 1 month ago

获取剪贴板没问题

Windows之前没有开启UTF8,我刚才打开了,试了一下,还是乱码,不知道和我语言设置是不是有关系 image

hitopo commented 1 month ago

另一个Y700平板也有这个问题,感觉是Windows相关的问题

ClassicOldSong commented 1 month ago

获取剪贴板没问题

Windows之前没有开启UTF8,我刚才打开了,试了一下,还是乱码,不知道和我语言设置是不是有关系

image

OK,了解了

Windows的字符串处理是老大难问题了,目前上传是手动获取当前codepage再转换的,可能还是得换别的方法

ClassicOldSong commented 1 month ago

应该修好了,试试看?

https://github.com/ClassicOldSong/Apollo/releases/tag/v0.2.4-alpha.2

hitopo commented 1 month ago

可以了,感谢!