diff --git a/package.json b/package.json index ba01b69be..2e2c087d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "th2-rpt-viewer", - "version": "5.1.26", + "version": "5.1.27", "description": "", "main": "index.tsx", "private": true, diff --git a/src/components/message/message-card/raw/SimpleMessageRaw.tsx b/src/components/message/message-card/raw/SimpleMessageRaw.tsx index d937b3cba..573db7b13 100644 --- a/src/components/message/message-card/raw/SimpleMessageRaw.tsx +++ b/src/components/message/message-card/raw/SimpleMessageRaw.tsx @@ -24,7 +24,7 @@ interface Props { export default function SimpleMessageRaw({ rawContent }: Props) { const contentRef = React.useRef(null); - const humanReadableContent = atob(rawContent); + const humanReadableContent = decodeURIComponent(escape(atob(rawContent))); const convertedArr = splitOnReadableParts(humanReadableContent); return ( diff --git a/src/helpers/rawFormatter.ts b/src/helpers/rawFormatter.ts index d0ffe112b..65fd24be2 100644 --- a/src/helpers/rawFormatter.ts +++ b/src/helpers/rawFormatter.ts @@ -68,7 +68,9 @@ export function decodeBase64RawContent(rawBase64Content: string): string[][] { const offset = []; const hexadecimal = []; const humanReadable = []; - const raw = Uint16Array.from(atob(rawBase64Content), c => c.charCodeAt(0)); + const raw = Uint16Array.from(decodeURIComponent(escape(atob(rawBase64Content))), c => + c.charCodeAt(0), + ); let index = 0; const { length } = raw; while (index < length) {