sonixd icon indicating copy to clipboard operation
sonixd copied to clipboard

Visible substitution characters instead of UTF-8 punctuation

Open woodruffw opened this issue 3 years ago • 8 comments

Describe the bug

It's common for autotaggers (like beets) to normalize metadata using the UTF-8 punctuation range. For example, here's how beets autotags the band "alt-J"

alt‐J

In the above, the dash is actually U+2010 and not the standard ASCII dash (0x2d).

When Sonixd encounters these, it seems to replace them with U+2612, i.e. ☒. I'm not 100% certain about that, since Sonixd won't let me highlight and select the artist's name for copying.

See screenshots for the visual effects.

To Reproduce

Steps to reproduce the behavior:

  1. Index a Subsonic-compatible server with an artist named alt‐J and at least one album
  2. View the artist's page in Sonixd

Expected behavior

Sonixd should render UTF-8 punctuation correctly.

Screenshots

Image 2-25-22 at 6 26 PM

Desktop (please complete the following information):

  • OS: macOS 12.2 (x86)
  • Version: 0.13.1

woodruffw avatar Feb 25 '22 23:02 woodruffw

I'll take a look into this.

jeffvli avatar Mar 01 '22 21:03 jeffvli

Does the "☒" appear anywhere else in the application (like when viewing the album in the album list)?

If you create a playlist using the title alt‐J, does the title there also not display correctly? I'm having trouble replicating this on my side (also don't have a macOS device to test).

jeffvli avatar Mar 03 '22 06:03 jeffvli

It's also possible that your server is returning ☒ character, rather than it displaying it improperly on Sonixd.

I'm not sure which server you're using, but can you access it via the native web-UI and see if it displays properly there?

jeffvli avatar Mar 03 '22 06:03 jeffvli

Does the "☒" appear anywhere else in the application (like when viewing the album in the album list)?

Is this the album list you had in mind? If so, then yes:

Screen Shot 2022-03-03 at 10 06 26 AM

The same character also shows up in the playlist view when I create a test playlist:

Screen Shot 2022-03-03 at 10 07 29 AM

I'm using Navidrome as my Subsonic-compatible server, here's how one of the albums appears in its native web UI:

Screen Shot 2022-03-03 at 10 09 23 AM

So I don't think it's returning the ☒, but it's possible that Navidrome's web UI doesn't use the same Subsonic APIs. I'll test with another web client in a moment.

woodruffw avatar Mar 03 '22 15:03 woodruffw

Just tested with Jamstash, an HTML5 client for Subsonic APIs:

Screen Shot 2022-03-03 at 10 12 12 AM

It renders correctly there, so I don't think the Subsonic API is returning the wrong character.

woodruffw avatar Mar 03 '22 15:03 woodruffw

I still can't reproduce this unfortunately.

I grabbed an album and tagged it using Picard to try to replicate what you have but it displays properly (using Navidrome as well). Have you tried switching between different fonts in the settings to see if that resolves it? image

jeffvli avatar Mar 05 '22 11:03 jeffvli

I grabbed an album and tagged it using Picard to try to replicate what you have but it displays properly (using Navidrome as well). Have you tried switching between different fonts in the settings to see if that resolves it?

Thanks for the tip; I'll try that on Monday. I'm currently using whatever the defaults are (on macOS).

woodruffw avatar Mar 06 '22 02:03 woodruffw

Unrelated, but just in case others have the same problem: it looks like the root "problem" here is that MusicBrainz uses the formatting character range for many artists/albums/tracks, which beet then agnostically applies.

There's a tracking issue on beets itself for this behavior: https://github.com/beetbox/beets/issues/2558

woodruffw avatar Mar 06 '22 02:03 woodruffw