Fix UTF-16BE text decoding for song titles and file paths#23
Open
MarlonS91 wants to merge 3 commits intoTobiasJacob:masterfrom
Open
Fix UTF-16BE text decoding for song titles and file paths#23MarlonS91 wants to merge 3 commits intoTobiasJacob:masterfrom
MarlonS91 wants to merge 3 commits intoTobiasJacob:masterfrom
Conversation
…ignore patterns in Jest configuration.
- Add UTF-16BE parsing for 'tsng' (Song Title) and 'pfil' (File Path) chunks - Previously used latin1 encoding which failed to decode UTF-16BE text - Now swap bytes and decode as UTF-16LE to match Serato's encoding format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes UTF-16BE text decoding in Serato library files and updates Jest test infrastructure to v25.
Changes
🐛 Fix: Correct UTF-16BE text decoding in 'tsng' and 'pfil' chunks
Problem:
The parser was using
latin1encoding for all text chunks by default, which failed to properly decode UTF-16BE encoded text in Serato library files. This caused emojis and special characters in song titles and file paths to display incorrectly.Solution:
Added specific parsing logic for
tsng(Song Title) andpfil(File Path) chunks:⬆️ Chore: Update Jest dependencies and test configuration
Dependency Updates:
@types/jest:24.9.1→25.1.0ts-jest:24.3.0→25.2.0Configuration Improvements:
"(/tests/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$"/tests/directory and.test./.spec.naming conventionstestPathIgnorePatterns:["/node_modules/", "/lib/"]📦 Chore: Bump version to 1.3.2
Updated package version to reflect the bug fix and dependency updates.
Testing
Commits