本帖最后由 Awesome·LYG 于 2023-11-14 17:06 编辑
这是一段拳头给出的base64编码:
[JavaScript] 纯文本查看 复制代码 eyJjb3VudHJ5IjoiaGtnIiwic3ViIjoiM2NkY2NkZjItZWU0Yi01ZjgwLThmN2UtZjhkZTYzNjk1M2NlIiwicHciOnsiY25nX2F0IjoxNjgxMTk4NzAzMDAwLCJyZXNldCI6ZmFsc2UsIm11c3RfcmVzZXQiOmZhbHNlfSwibG9sIjp7ImN1aWQiOjMyMTQyNDM2NzE1NDk1MDQsImNwaWQiOiJUVzIiLCJ1aWQiOjMyMTQyNDM2NzE1NDk1MDQsInBpZCI6IlRXMiIsImFwaWQiOm51bGwsInBsb2MiOiJ6aC1UVyIsImxwIjpmYWxzZSwiYWN0aXZlIjp0cnVlfSwib3JpZ2luYWxfcGxhdGZvcm1faWQiOiJUVzIiLCJpc3MiOiJodHRwczovL2F1dGgucmlvdGdhbWVzLmNvbSIsIm9yaWdpbmFsX2FjY291bnRfaWQiOjMyMTQyNDM2NzE1NDk1MDQsInByZWZlcnJlZF91c2VybmFtZSI6IjFsaWs4ZkhGIiwiYmFuIjp7InJlc3RyaWN0aW9ucyI6W119LCJwbGF5ZXJfbG9jYWxlIjoiemgtVFciLCJpYXQiOjE2OTk5NTA1NDYsImp0aSI6IkdNS0VsU2FTWG5JIiwibG9sX2FjY291bnQiOnsic3VtbW9uZXJfaWQiOjMyMTQyNDM2NzE1NDk1MDQsInByb2ZpbGVfaWNvbiI6MjksInN1bW1vbmVyX2xldmVsIjoxMCwic3VtbW9uZXJfbmFtZSI6IuiCpeWuhemYv-aftDI5MiJ9LCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsInBsYXllcl9wbG9jYWxlIjpudWxsLCJjb3VudHJ5X2F0IjoxNjgxMTk4NzAyMDAwLCJwaG9uZV9udW1iZXJfdmVyaWZpZWQiOmZhbHNlLCJwaG90byI6Imh0dHBzOi8vYXZhdGFyLmxlYWd1ZW9mbGVnZW5kcy5jb20vdHcyLyVFOCU4MiVBNSVFNSVBRSU4NSVFOSU5OCVCRiVFNiU5RiVCNDI5Mi5wbmciLCJhY2NvdW50X3ZlcmlmaWVkIjpmYWxzZSwicHBpZCI6bnVsbCwiYXVkIjoibG9sIiwibG9sX3JlZ2lvbiI6W3siY3VpZCI6MzIxNDI0MzY3MTU0OTUwNCwiY3BpZCI6IlRXMiIsInVpZCI6MzIxNDI0MzY3MTU0OTUwNCwicGlkIjoiVFcyIiwibHAiOmZhbHNlLCJhY3RpdmUiOnRydWV9XSwicHZwbmV0X2FjY291bnRfaWQiOjMyMTQyNDM2NzE1NDk1MDQsInJlZ2lvbiI6eyJsb2NhbGVzIjpudWxsLCJpZCI6IlRXMiIsInRhZyI6InR3MiJ9LCJhY2N0Ijp7InR5cGUiOjAsInN0YXRlIjoiRU5BQkxFRCIsImFkbSI6ZmFsc2UsImdhbWVfbmFtZSI6IuiCpeWuhemYv-aftDI5MiIsInRhZ19saW5lIjoiVFcyIiwiY3JlYXRlZF9hdCI6MTY4MTE5ODcwMjAwMH0sImFnZSI6MzIsInVzZXJuYW1lIjoiMWxpazhmSEYiLCJhZmZpbml0eSI6eyJwcCI6ImFzIn19
精易模块的编码_BASE64解码和编码_BASE64解码A这2个命令,解码出来给出了2个不同的编码。
编码_BASE64解码 给出的结果是ansi编码,写到本地看也是ansi编码,导致summoner_name和game_name这2个参数的玩家名字是乱码的;
编码_BASE64解码A 给出的结果是utf8编码,这个应该是对的,summoner_name和game_name参数的玩家名字也是对的
变量名 | 类 型 | 静态 | 数组 | 备 注 | 文本 | 文本型 | | | 解码后 | 字节集 | | | 文本2 | 文本型 | | |
文本 = “eyJjb3VudHJ5IjoiaGtnIiwic3ViIjoiM2NkY2NkZjItZWU0Yi01ZjgwLThmN2UtZjhkZTYzNjk1M2NlIiwicHciOnsiY25nX2F0IjoxNjgxMTk4NzAzMDAwLCJyZXNldCI6ZmFsc2UsIm11c3RfcmVzZXQiOmZhbHNlfSwibG9sIjp7ImN1aWQiOjMyM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hY3RpdmUiOnRydWV9XSwicHZwbmV0X2FjY291bnRfaWQiOjMyMTQyNDM2NzE1NDk1MDQsInJlZ2lvbiI6eyJsb2NhbGVzIjpudWxsLCJpZCI6IlRXMiIsInRhZyI6InR3MiJ9LCJhY2N0Ijp7InR5cGUiOjAsInN0YXRlIjoiRU5BQkxFRCIsImFkbSI6ZmFsc2UsImdhbWVfbmFtZSI6IuiCpeWuhemYv-aftDI5MiIsInRhZ19saW5lIjoiVFcyIiwiY3JlYXRlZF9hdCI6MTY4MTE5ODcwMjAwMH0sImFnZSI6MzIsInVzZXJuYW1lIjoiMWxpazhmSEYiLCJhZmZpbml0eSI6eyJwcCI6ImFzIn19”解码后 = 编码_BASE64解码 (文本 )写到文件 (取特定目录 (3 ) + “\解码后文本1.txt”, 解码后 )解码后 = 编码_BASE64解码A (到字节集 (文本 )) 写到文件 (取特定目录 (3 ) + “\解码后文本2.txt”, 解码后 )
我以为编码_BASE64解码命令的问题,导致utf8编码他解码出来是ansi,然后写了个测试子程序:
变量名 | 类 型 | 静态 | 数组 | 备 注 | 文本 | 文本型 | | | 解码后 | 字节集 | | | 文本2 | 文本型 | | |
文本 = “123测试123”文本2 = 到文本 (编码_BASE64编码A (编码_Ansi到Utf8 (文本 )) )调试输出 (文本2 )解码后 = 编码_BASE64解码 (文本2 )写到文件 (取特定目录 (3 ) + “\解码后文本1.txt”, 解码后 )解码后 = 编码_BASE64解码A (到字节集 (文本2 )) 写到文件 (取特定目录 (3 ) + “\解码后文本2.txt”, 解码后 )
结果发现这样他输出也是utf8编码的文本,所以我现在懵了,前面那个文本他为啥解码出来是ansi编码?
|