pytaglib icon indicating copy to clipboard operation
pytaglib copied to clipboard

Problem with encoding and other charsets

Open BennetLe opened this issue 1 year ago • 5 comments

If I use pytaglib to add a new tag that contains for example an Ä, Ö or Ü it is not saved correct and looks like this: grafik If I read the tag again with pytaglib the output is correct but Window wont display it porpperly. If I use another program to add the tag I dont have the problem.

BennetLe avatar Mar 24 '24 12:03 BennetLe

Hi Bennet, thanks for your report.

and looks like this: which application is that screenshot from?

Window wont display it porpperly. Same question, what is "Window" here?

supermihi avatar Mar 25 '24 13:03 supermihi

Sorry I ment to type Windows. The screenshot is from the default file explorer.

BennetLe avatar Mar 26 '24 14:03 BennetLe

I also ran into the same issue with special chars. I tried opening the tracks on MusicBrainz Picard and the names appeared written correctly in there. After adding a space in front of the name and saving it in Picard it fixed the issue of the names appearing mangled on the files.

JR3IS avatar Apr 07 '24 11:04 JR3IS

This could be caused by pytaglib using UTF-8 encoding for all tags, while other taggers / viewers might use different settings. Which file type are you working with, is it MP3?

Could you try the following: save tags with picard, trying different text encodings (see here for how to set it). Can you reproduce the problem (and/or the correct behavior) with any of those?

Alternatively (or in addition), can you figure out the encoding and ID3 version of both the broken and correct files? I am not sure if the first is possible, but e.g. picard shows the ID3 version if you right-click a file and select "Info..".

You can also send me one of the files and I'll try to find the time to debug it myself.

supermihi avatar Apr 12 '24 09:04 supermihi

Thanks for the response.

The only file type where the problem happens is wav. I tried saving in Picard with all encoding types and both ID3 versions and couldn't reproduce the issue. It always comes out correct.

I'm using it here, for reference: https://github.com/JR3IS/Batch-Audio-Tagger.git

JR3IS avatar Apr 13 '24 00:04 JR3IS