Tagger crashes when dealing with non-valid UTF-8 encoding
Tags containing non UTF-8 make Tagger crash when attempting to write them to a file name. I've got a few hundred songs to tag from an IPod, and any accented characters makes Tagger crash when attempting to write filename using tags.
(org.nickvision.tagger:2): Pango-WARNING **: 11:36:29.707: Invalid UTF-8 string passed to pango_layout_set_text()
terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
what(): filesystem error: cannot rename: Invalid or incomplete multibyte or wide character [/media/pierre/Powerdrive/Alex/IPod8G/EQDF.mp3] [/media/pierre/Powerdrive/Alex/IPod8G/J'ai Demand� La Lune- Indochine.mp3]
]
Expected behaviour: Tagger either prompts user for source encoding and re-encodes to UTF-8 (could offer to convert metadata to UTF-8 as well while at it) or escape non UTF-8 encoding so Tagger doesn't crash
(thanks so much for the app by the way, it's really a godsend)
I plan on rewriting Tagger with QT (using libadwaita styled controls similar to Fedora Media Writer). Will fix in that release, just may take a little bit.
https://github.com/nlogozzo/NickvisionTagger/commit/8f3cc9b0da01236e5e6f447ca55b4189a7678dde
https://github.com/nlogozzo/NickvisionTagger/releases/tag/2022.8.0