我尝试从Base64字符串转换UTF8,但返回的结果有无意义的字符
Public Module Base64Decoder
Sub Main()
Dim inputText As String
inputText = "BgAAAFOUR1Ue36wvZwOGNkPEStG/lFZ+L0llB7KsvMRw0mqchfgIzwR144c87V6xOsiRCgACAACAW9H7Z15JQe+MwYVJ3tQJUkIzIqILi6+P7JFpgq6cNR6CvIumW5jspbPvEWkWFwNVOB7eG9o9ngeL3X5qYd2JWjOOVvL9Jwh4fG6C8GcxMCDfx3WaOSYLP+W3A9csE00EkgFU3z40YTnoZfweHcatgvZdH3O1xRQDmFEpfEOosQmhrX7+EMTz/kHr9n8UlWUg7fuI6Mk+Evg4gn6oNriXCkrCYmgv1qfq6+u0njE76wnIOnQyMeoLQI7FfqiXgQbQF7/MkisG+R/7tF0kzVu7Zjgsa2RPuAvLKNjMGc6wHI6cIy59AZWuGs3yqS/Z0Je5F17Bt4QWI9GVqawMfbzlnzwqho2umkdNVSwNnJ+nBEfJQIjsNdY2NYjDakeNSn1ayDbfHnJHKjgOWVAfM6YxkEEFXvdZ8bY8PTC2Kr42zefh5XLUPK2bvyUHTHB+hryhQnCGQqS7JPXInfRaPiJWi2C//u/4SSk6WDiEVmBbrM5pkDKeWoC8Cpr+7m8YlzwUfgT3qz4JgtSjmqFIJMkyAUWN24zZDYMSrQ8If5L+CNOZuy/FqcDwBzONocOUbn+t93zp7vfaUlxvmQc8l3cKvROA7TlvOnZRdcK0UerGhf9C+rZLtSFlk+xdiHqiZQ7mnKcHg1cukqG7WNBzMItRjM3Gn3HjZIM3baa5PlU3TQ=="
Console.Out.WriteLine("Input text: {0}", inputText)
Dim decodedBytes As Byte()
decodedBytes = Convert.FromBase64String(inputText)
Dim decodedText As String
decodedText = Encoding.UTF8.GetString(decodedBytes)
Console.Out.WriteLine("Decoded text: {0}", decodedText)
End Sub
End Module
结果:
???+???]$?[?f8,kdO??(?????#.}????/???^???#???}??<*????GMU,
???G?@??5?65??jG?J}Z?6?rG*8YP3?1?A^?Y?<=0?*?6????r?<???%Lp~???Bp?B??$???Z>"V?`????I):X8?V`[??i?2?Z??
???o?<~??> ????H$?2E???
??????/u??3??Ôn??|????R\o?<?w
???9o:vQu´Q???B??K?!e??]?z?e??W.???X?s0?Q??Oq?d?7m??>U7M