Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strings with Unicode control characters are encoded verbatim #105

Open
fwcd opened this issue Mar 27, 2024 · 0 comments
Open

Strings with Unicode control characters are encoded verbatim #105

fwcd opened this issue Mar 27, 2024 · 0 comments

Comments

@fwcd
Copy link

fwcd commented Mar 27, 2024

First of all, thanks for this amazing tool! It has proven to be really useful for exporting music libraries e.g. for portable use in the DJ software Mixxx, which has an importer for the iTunes XML format.

Recently, I've tried to export a large library containing some esoteric track titles and came across a small difference between the way this app encodes characters and the XML directly exported from Music.app that Mixxx had trouble parsing. Consider this admittedly unusual title (don't ask me where this came from):

奔剅 Ԁ ㈀㄰吹塘X " 䕒䱐奁䅇义呟䅒䭃䝟䥁Nㄭ⸱〵㈱搠呂剄C �̀〲㤱䍔䵏 ऀ 刃汥慯敄呥偂M �̀㐱吸䕋Y �̀궙

The problematic characters are U+0004 and U+0005 (i.e. Unicode control characters). Music.app seems to remove them while Music Library Exporter preserves them:

Music Library Exporter: <string>奔剅 Ԁ ㈀㄰吹塘X " 䕒䱐奁䅇义呟䅒䭃䝟䥁Nㄭ⸱〵㈱搠呂剄C �̀〲㤱䍔䵏 ऀ 刃汥慯敄呥偂M �̀㐱吸䕋Y �̀궙</string>
Music.app:              <string>奔剅 Ԁ ㈀㄰吹塘X " 䕒䱐奁䅇义呟䅒䭃䝟䥁Nㄭ⸱〵㈱搠呂剄C  ̀〲㤱䍔䵏 ऀ 刃汥慯敄呥偂M  ̀㐱吸䕋Y  ̀궙</string>

Perhaps Music Library Exporter could filter out control characters too to make the file more robust against brittle parsers? (I know this is very much an edge case, but it would still be a nice quality-of-life improvement for large libraries than happen to contain strange characters).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant