{"action":"created","issue":{"url":"https://api.github.com/repos/Troogle/OSUplayer/issues/75","labels_url":"https://api.github.com/repos/Troogle/OSUplayer/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/Troogle/OSUplayer/issues/75/comments","events_url":"https://api.github.com/repos/Troogle/OSUplayer/issues/75/events","html_url":"https://github.com/Troogle/OSUplayer/issues/75","id":109013248,"number":75,"title":"辣鸡QQ的接口变了","user":{"login":"UlyssesWu","id":4312781,"avatar_url":"https://avatars.githubusercontent.com/u/4312781?v=3","gravatar_id":"","url":"https://api.github.com/users/UlyssesWu","html_url":"https://github.com/UlyssesWu","followers_url":"https://api.github.com/users/UlyssesWu/followers","following_url":"https://api.github.com/users/UlyssesWu/following{/other_user}","gists_url":"https://api.github.com/users/UlyssesWu/gists{/gist_id}","starred_url":"https://api.github.com/users/UlyssesWu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UlyssesWu/subscriptions","organizations_url":"https://api.github.com/users/UlyssesWu/orgs","repos_url":"https://api.github.com/users/UlyssesWu/repos","events_url":"https://api.github.com/users/UlyssesWu/events{/privacy}","received_events_url":"https://api.github.com/users/UlyssesWu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-09-30T04:44:46Z","updated_at":"2015-11-15T15:24:00Z","closed_at":null,"body":"以前PutRSInfo是可以接Unicode字符串的，然而在最新版的QQ（7.6 15742）中，它的行为方式变了，他会把输入的字符串都看做ANSI，然后转一个UTF8。结果自然是中文全部乱码，惨不忍睹。英文不受影响。\r\n\r\n![osup](https://cloud.githubusercontent.com/assets/4312781/10184707/61d3b036-6772-11e5-9ca0-68030cd31b9b.png)\r\n\r\n为了绕过这个问题，我尝试使用这种方式：\r\n\r\n\t var ub = Encoding.UTF8.GetBytes(\"镇命歌\");\r\n\t var gs = Encoding.Default.GetString(ub); //Unicode显示的GB2312强行编码的内容实际为UTF8的字符串\r\n\t var gb = Encoding.Default.GetBytes(gs);\r\n\t var us = Encoding.UTF8.GetString(gb);\r\n\r\n![ansi](https://cloud.githubusercontent.com/assets/4312781/10184703/5b52c940-6772-11e5-8625-dfba11aa5da3.png)\r\n\r\n结果自然是，前两个字正常显示成功，第三个字由于GB2312的汉字是2个字节，UTF8的汉字是三个字节，因此第9个字节被吃了，并且补了问号。看来是行不通的（虽说偶数个汉字是可以正常显示）。\r\n\r\n不知道QQ这是故意为之，还是哪里出BUG。不知这个问题有没有解？\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Troogle/OSUplayer/issues/comments/156817830","html_url":"https://github.com/Troogle/OSUplayer/issues/75#issuecomment-156817830","issue_url":"https://api.github.com/repos/Troogle/OSUplayer/issues/75","id":156817830,"user":{"login":"UlyssesWu","id":4312781,"avatar_url":"https://avatars.githubusercontent.com/u/4312781?v=3","gravatar_id":"","url":"https://api.github.com/users/UlyssesWu","html_url":"https://github.com/UlyssesWu","followers_url":"https://api.github.com/users/UlyssesWu/followers","following_url":"https://api.github.com/users/UlyssesWu/following{/other_user}","gists_url":"https://api.github.com/users/UlyssesWu/gists{/gist_id}","starred_url":"https://api.github.com/users/UlyssesWu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UlyssesWu/subscriptions","organizations_url":"https://api.github.com/users/UlyssesWu/orgs","repos_url":"https://api.github.com/users/UlyssesWu/repos","events_url":"https://api.github.com/users/UlyssesWu/events{/privacy}","received_events_url":"https://api.github.com/users/UlyssesWu/received_events","type":"User","site_admin":false},"created_at":"2015-11-15T15:24:00Z","updated_at":"2015-11-15T15:24:00Z","body":"@JixunMoe 作为一个渣渣，我连应该hook哪里也不懂……CTXStringA的构造函数？还是PutRSInfo？然而PutRSInfo其实是一个内部函数，并没有导出，图里名字是我自己标注的。如果hook构造函数，怎么判断调用者？另外为了让PutRSInfo能调用另一个CTXStringA的构造函数，其实还需要把那个构造函数添加到导入表，因为原本它是不导入UTF8版函数的，只导入GBK版。\r\n不过我已搞了另一种方案：在上述Patch的基础上，修改导出表，强行导出PutRSInfo函数，然后从我们的程序中调用。经测试似乎也可以用。这样不用考虑每次更新后Patch文件，而是一直调用已经Patch过的DLL就好。"}}