Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

base64 decoding in js is not resulting in expected output. Why?

Not applicable

Scenario-

I am getting input as a base64 encoded string of an excel file which later on i am trying to decode it and send it as a multipart request to backend.

Error getting;-

When i am trying to decode the encoded string using common base64 js its getting decoded in some other language.Why is this happening??ideally it should get decoded in ASCII format but its not..

Attaching the encoded string..

Its decoding the encoded string in something below mentioned way

PK!IïáÉü[Content_Types].xml ¢( ÌVÛNã0}Gâ"¿¢Æ-¬V5åañ€X$àL<M¬&¶噖öïwbHAz¡AۗÜì9çŒ=sœáù¼®’4ÎfböE6wÚØ"W½S‘ )«Uå,db(ÎG‡Ç…L8Úb&J"&%æ%Ô
SçÁòÈ؅Z¿†Bz•OTò¸ßÿ-sg,õ¨Á£áŒմ¢ärΟ_”<+’?/óªL(ï+“+b¡rfõ’žMÚåӚ¡Sô”Æ€ê*õÁ0c¸"N…ü”3@…ۑ¾f•rd†¥ñxĩÁЌ|ÕkÜ_ގ`4$w*Эª9w9¯ä³“'ç&éjm—&.QZ+c[Ý+øãd”ñ6èXH“_ÞRÇñžè8Ù¿þ“âÞ¯»—F„YSH‹
°ëvˆ ë˜K@ß»Jѹ€÷Økt

Any help on this? why is this happening?

0 17 3,950
17 REPLIES 17