Skip to content

Character encoding issue #150

Description

@icidasset

Checklist

  • I have searched the issue tracker for any duplicate issues and confirmed that this bug has not been reported before.
  • I have tested the issue with the upstream project MediaInfo and can confirm that the problem only exists in mediainfo.js.
  • I have attached all necessary test files, if applicable, so that the issue can be easily reproduced by the developers.
  • I have added a reproduction repository or a code sandbox that clearly illustrates the issue. Providing a minimal example will greatly help the developers in understanding and resolving the problem.

Bug Description

The metadata of an MP3 file has character encoding issues.
It's listing the artist as �me instead of Âme

Steps to Reproduce

const mediainfo = await MediaInfoFactory({
    coverData: covers,
    locateFile: () => {
      return "../../wasm/media-info.wasm";
    },
})

const result = await mediainfo.analyzeData(
    getSize(headUrl),
    readChunk(getUrl)
)

Where getSize and readChunk is: https://github.com/icidasset/diffuse/blob/b11d5b0a8d204ed3db401c0eedb8da25e4076131/src/Javascript/processing.ts#L116-L155

Using the file:
https://www.dropbox.com/scl/fi/u7qw9rgo7xjmcajsh1oex/211-me_-_rej.mp3?rlkey=tmwckk19p4n7r7gd5g8ngk7cz&dl=0

You can try it out in the app itself using this branch:
https://github.com/icidasset/diffuse/tree/encoding-issue-mediainfo

You'll have to upload the file to a supported service in order to test it though.
I can do that for you if you want, let me know.

Expected Behavior

Expected to see the artist Âme

Actual Behavior

Got the artist �me

Environment

  • mediainfo.js version: 0.2.1
  • Operating System: macOS Sonoma
  • Browser (if applicable): Chromium 121

Additional Information

I tested this with the mediainfo CLI tool installed via homebrew where it did parse the metadata correctly, uses MediaInfoLib v24.01. Other metadata parsers show the info correctly too.

Thanks for this great project!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions