I want to decode a string. When I do it on PHP, Go, Python it gives different result than NodeJS. I tried a lot of base64 encoding/decoding libraries but result is always same. I spent 5 hours on this bug.
I want to decode this:
5wEoKBapCmDCaJrRCiwKFK1SIOQ8Y1K2V5UZbAOuNOhVgY+MEhQKBXVhdG9tEgsyMDA5OTAwMDAwMBIsChT59Ec6oQnuK5uLa1iNNvuWKdSOMBIUCgV1YXRvbRILMjAwOTkwMDAwMDASEwoNCgV1YXRvbRIEMTAwMBDAmgwaagom61rphyEDEfz4OLFOxWBL6HQbJLlw1nRE7zbfrXzYFJg8YIKC5fwSQAYqnpgwKpdJMx6L5ktYPYb7Lm81Xe2eXoRAloQQNKyhTvHaOBZzWGYSQSuWlMPxhJ9C4sxbeg1UN2lVJ8NLrYo=
When I decode it with Node result is:
�((�
`�h��
,
�R �<cR�W�l�4�U���
uatom
20099000000,
��G:� �+��kX�6��)Ԏ0
uatom
20099000000
uatom1000��
j
T7iU'�K��N�`K�t�p�tD�6߭|��<`����@*��0*�I3��KX=��.o5]�^�@��4��N��8sXfA+����B��[z
On the other languages like PHP, Python, Go result is:
?((?
`?h??
,
?R ?<cR?W?l?4?U???
uatom
20099000000,
??G:? ?+??kX?6??)Ԏ0
uatom
20099000000
uatom1000??
j
T7iU'?K??
What I have tried so far? I tried built in Buffer:
Buffer.from("myData", 'base64').toString("utf-8")
I tried this solution: https://stackoverflow.com/a/30106551/7886428 But it gives error:
UnhandledPromiseRejectionWarning: URIError: URI malformed
at decodeURIComponent (<anonymous>)