toast
toast copied to clipboard
Characters get garbled or even no notification when contains Chinese or Japanese.
I tested the code and the case one by one, and got this result:
func main (){
notification := toast.Notification{
Title: "1_Title",
// 2_Title
// 3_Title
// 4_Title
// 5_标题
Message: "msg test",
// msg 测试
// msg テスト
// 测试
// msg test
}
notification.Push()
}
Notifications 2,4,5 got garbled, and Notification 3 is not be notified. Message 2,4 have Chinese characters. Message 3 has Japanese characters. Title 5 have Chinese characters.
The version of Windows 10 is 18362.239.
same issue from 17763.379
我也遇到这个问题,找了好久,
原因是windows的utf8是带bom, go生成的文件没有bom,导致乱码,
解决方案是修改toast.go文件的343行(方法invokeTemporaryScript)下添加一行content = "\uFEFF" + content
这句话的意思是在生成的文件之前添加bom标识,这样就可以了
I had the same problem. I searched for it for a long time. The reason is that utf8 of Windows is with bom, and the file generated by go has no bom, resulting in garbled codes. The solution is to modify the toast. Go file by adding a line 'content = "\uFEFF" + content' under line 343 (method invokeTemporaryScript) This sentence means to add the bom identification before the generated file, so that it is ok
我也遇到这个问题,找了好久, 原因是windows的utf8是带bom, go生成的文件没有bom,导致乱码, 解决方案是修改toast.go文件的343行(方法invokeTemporaryScript)下添加一行
content = "\uFEFF" + content
这句话的意思是在生成的文件之前添加bom标识,这样就可以了I had the same problem. I searched for it for a long time. The reason is that utf8 of Windows is with bom, and the file generated by go has no bom, resulting in garbled codes. The solution is to modify the toast. Go file by adding a line 'content = "\uFEFF" + content' under line 343 (method invokeTemporaryScript) This sentence means to add the bom identification before the generated file, so that it is ok
大佬牛啊,解决了! A wonderful solution, that I've solved this problem by it.