Skip to content

Unicode characters(Korean) corrupted in EXIF metadata #13

@gerosyab

Description

@gerosyab

When writing EXIF metadata with Korean characters, they get corrupted.

Example:

  • Input: "안녕하세요" (Korean)
  • Output: Something like "HUX8�" or other garbled text

Environment

  • @uswriting/exiftool v1.0.4
  • Browser: Chrome/Safari on Windows/Mac
  • File type: JPEG

Test Results

안녕하세요: Got "HUX8�"

Reproduction

import { parseMetadata, writeMetadata } from '@uswriting/exiftool';

const result = await writeMetadata(jpegFile, {
  Artist: "안녕하세요"
}, {
  charset: 'utf8',
  args: ['-charset', 'utf8', '-L']
});

const modified = new File([result.data], 'test.jpg');
const readBack = await parseMetadata(modified);
// Korean text is corrupted here

Seems like the WASM ExifTool isn't handling UTF-8 properly. English works fine, but CJK characters get mangled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions