I have the following base 64 encoded string:
e4EdYQYDTpC7sN0K87elHA==
In Window.Atob in javascript it provides me with {aN»°Ý ó·¥ however when running the below code in Java it gives me
{�aN����
�
String encodedString = "e4EdYQYDTpC7sN0K87elHA==";
Decoder decoder = Base64.getDecoder();
byte[] decodedByte = decoder.decode(encodedString);
String decodedString = new String(decodedByte);
System.out.println(decodedString);
As you can see the output is extended ascii but I cannot seem to replicate the results of Window.atob in java.
The Byte output from Java is:
123
-127
29
97
6
3
78
-112
-69
-80
-35
10
-13
-73
-91
28
While the output should be:
123 194 129 029 097 006 003 078 194 144 194 187 194 176 195 157 032 195 179 194 183 194 165 028
Any ideas on what needs to be done in order to replicate the result.