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

Non-ASCII characters and Encoding Issue #882

Closed
wonderfulShrineMaidenOfParadise opened this issue Aug 23, 2021 · 5 comments
Closed

Non-ASCII characters and Encoding Issue #882

wonderfulShrineMaidenOfParadise opened this issue Aug 23, 2021 · 5 comments

Comments

@wonderfulShrineMaidenOfParadise

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Add any music with non-ascii charcters. For example, 永夜抄 ~ Eastern Night..
  2. See the library. There is a theme �i���@�` Eastern Night..

Expected behavior
There should be a theme shown as 永夜抄 ~ Eastern Night.

Screenshots
Screenshot_20210824_040835

Server (please complete the following information):

  • Nextcloud version: 21.1.0.1
  • Music app version: 1.2.1
@paulijar
Copy link
Collaborator

Hi. The application should be able to handle any UTF-8 data as demonstrated by the following screen shot from my test library. Are you sure that your file is actually using UTF-8 encoding on its metadata? If you can share a sample of such a problematic file, I can take a look. You can find my email address from my github profile.

image

@wonderfulShrineMaidenOfParadise
Copy link
Author

Okay. I have mailed you with the theme 永夜抄 ~ Eastern Night..wav attached.

@paulijar
Copy link
Collaborator

Thanks for the file. Indeed it seems that the file contains metadata encoded in some non-standard way. The thing is, this file contains the title, artist name, and album name in its RIFF headers, but those headers are supposed to be encoded using ISO8859-1. This encoding, on the other hand, can only store Latin-based scripts. But now this file uses some other encoding there. It doesn't seem to be UTF8, either, but even if it was the file would still be violating the standard.

I viewed the file also with the Mp3tag software and this is how it showed up there:
image

However, this isn't quite the whole story yet. I noticed that it's possible to write more proper Japanese tags to the WAV file with the Mp3tag application. When this is done, it uses ID3v2.3-type tags for the UTF-8-encoded data while simultaneously filling the RIFF headers with substitute strings like "??? ~ Eastern Night". That is, anything not representable in ISO8859-1 is substituted with a question mark there. This is reasonable but unfortunately it didn't work with the Music app all that well: the Music app found both the RIFF headers and the ID3v2.3 tags but chose to show the name "??? ~ Eastern Night" from the RIFF header instead of the more appropriately filled ID3v2.3 tag. I still need to investigate if there would be any saner way to arbitrate between the different tags formats.

@wonderfulShrineMaidenOfParadise
Copy link
Author

Now I know why it happens. Thank you for answering👍

@wonderfulShrineMaidenOfParadise wonderfulShrineMaidenOfParadise changed the title Non-ASCII characters and UTF-8 Support Non-ASCII characters and Encoding Issue Aug 25, 2021
@paulijar
Copy link
Collaborator

paulijar commented Sep 5, 2021

The new Music v1.3.2 release now contains a fixed version of the getID3 library where WAV files with non-Latin characters work better. Files like in the opening post (*) still cannot be supported, because that is basically not possible by following the standards. However, the WAV files containing ID3v2 tags should now be shown correctly with any Unicode content. The ID3v2 tags may be written, for example, with the Mp3tag application.

(*) File with metadata stored in the RIFF headers using some encoding other than ISO8859-1

@paulijar paulijar closed this as completed Sep 5, 2021
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

2 participants