Skip to content

Commit 5d48b95

Browse files
committed
nit
1 parent 6571405 commit 5d48b95

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/scripts/pnginfo.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ export function getFlacMetadata(file: File): Promise<Record<string, string>> {
1212
return getFromFlacFile(file)
1313
}
1414

15-
const asciiDecoder = new TextDecoder('ascii')
16-
1715
function parseExifData(exifData) {
1816
// Check for the correct TIFF header (0x4949 for little-endian or 0x4D4D for big-endian)
1917
const isLittleEndian = String.fromCharCode(...exifData.slice(0, 2)) === 'II'
@@ -52,7 +50,7 @@ function parseExifData(exifData) {
5250
let value
5351
if (type === 2) {
5452
// ASCII string
55-
value = asciiDecoder.decode(
53+
value = new TextDecoder('utf-8').decode(
5654
exifData.subarray(valueOffset, valueOffset + numValues - 1)
5755
)
5856
}

0 commit comments

Comments
 (0)