From 716ccb163b7eda0046f5fede9563291be3db4f6f Mon Sep 17 00:00:00 2001 From: Rahul Yadav Date: Wed, 23 Oct 2024 12:46:00 +0530 Subject: [PATCH] fix: correct Base64 decoding to support UTF-8 characters (#132) --- src/utility/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utility/utils.ts b/src/utility/utils.ts index fff7834..59c371d 100644 --- a/src/utility/utils.ts +++ b/src/utility/utils.ts @@ -43,7 +43,7 @@ export const encodeBase64 = (data: string) => { return Buffer.from(data).toString('base64'); }; export const decodeBase64 = (data: string) => { - return Buffer.from(data, 'base64').toString('ascii'); + return Buffer.from(data, 'base64').toString('utf-8'); }; export const objectToJSON = (obj: object) => {