Skip to content

Commit

Permalink
fix: unicode chars in fitname broke during import (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueBrain authored Jun 9, 2024
1 parent 2751cf3 commit 3f27913
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks/ImportEveShipFit/Decompress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ export async function decompress(base64compressedBytes: string): Promise<string>
Uint8Array.from(atob(base64compressedBytes.replace(/ /g, "+")), (c) => c.charCodeAt(0)),
]).stream();
const decompressedStream = stream.pipeThrough(new DecompressionStream("gzip"));
const reader = decompressedStream.getReader();
const reader = decompressedStream.pipeThrough(new TextDecoderStream()).getReader();

let result = "";
while (true) {
const { done, value } = await reader.read();
if (done) break;

result += String.fromCharCode.apply(null, value);
result += value;
}

return result;
Expand Down

0 comments on commit 3f27913

Please sign in to comment.