From 5648b6643698adfdf730a72dc5a1c8fd0a41ffcb Mon Sep 17 00:00:00 2001 From: Rahul Yadav Date: Tue, 22 Oct 2024 23:51:17 +0530 Subject: [PATCH] fix: correct Base64 decoding to support UTF-8 characters --- 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) => {