/
/
# What does this implement/fix? Track and album names in Cyrillic (and other non-Western) scripts showed up as `�������` instead of the real text. CUE sheets and playlist files are often written in a legacy codepage (cp1251 for Russian rips) rather than UTF-8. We asked a charset detector what to decode them with, but only trusted its answer above a high confidence score. A CUE sheet is nearly all ASCII keywords with just a few titles in the local codepage, so that score is never reached — we fell back to UTF-8 and every non-ASCII character became a replacement character. **Related issue (if applicable):** - https://github.com/music-assistant/support/issues/6093 Changes: - Text that is already valid UTF-8 is decoded as UTF-8 without consulting a detector at all, and a leading byte order mark is stripped. - Anything else is resolved with `charset-normalizer`, which reads these mostly-ASCII files correctly where the previous detector did not. - Replaces the `chardet` dependency with `charset-normalizer` (already present in every install as a transitive dependency). ## Types of changes - [x] Bugfix (non-breaking change which fixes an issue) — `bugfix` - [ ] New feature (non-breaking change which adds functionality) — `new-feature` - [ ] Enhancement to an existing feature — `enhancement` - [ ] New music/player/metadata/plugin provider — `new-provider` - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) — `breaking-change` - [ ] Refactor (no behaviour change) — `refactor` - [ ] Documentation only — `documentation` - [ ] Maintenance / chore — `maintenance` - [ ] CI / workflow change — `ci` - [ ] Dependencies bump — `dependencies` ## Checklist - [x] The code change is tested and works locally. - [x] `pre-commit run --all-files` passes. - [x] `pytest` passes, and tests have been added/updated under `tests/` where applicable. - [ ] For changes to shared models, the companion PR in `music-assistant/models` is linked. - [ ] For changes affecting the UI, the companion PR in `music-assistant/frontend` is linked. - [x] I have read and complied with the project's [AI Policy](https://github.com/music-assistant/.github/blob/main/AI_POLICY.md) for any AI-assisted contributions. - [ ] I have [raised a PR against the documentation repository](https://github.com/music-assistant/music-assistant.io/blob/main/CONTRIBUTING.md) targeting the main or beta branch as appropriate.