Use Unicode by default for CD-info data
ClosedPublic

Authored by yurchor on Jun 17 2019, 5:48 AM.

Details

Summary

Non-ASCII characters from CD-info are replaced with '?' by default in Latin1. This patch tries to use Unicode conversion.

BUG: 406262

https://bugs.kde.org/show_bug.cgi?id=406262

Test Plan
  1. Put some Audio-CD with known Unicode characters in the song titles (Cyrillic, Chinese, Korean, Greek, English with em-dashes or apostrophes).
  2. Choose to open it in Dolphin.
  3. Open "Information -> CDDB Information.txt".
  4. All Unicode chars should be shown as expected.

Diff Detail

Repository
R342 KIO AudioCD
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
yurchor requested review of this revision.Jun 17 2019, 5:48 AM
yurchor created this revision.
cfeck added a subscriber: cfeck.Jun 17 2019, 9:25 AM

Why does the commit message say "tries to" and "should be"? Could you actually test it and verify it?

Why does the commit message say "tries to" and "should be"? Could you actually test it and verify it?

I tested it on my very limited collection of Audio-CDs (3 pieces now, Cyrillic, Ukrainian, Russian). It may not work otherwise. I just put this revision here in hope that someone can test it.

Sorry for the noise, if it is inappropriate.

cfeck accepted this revision.Jun 17 2019, 9:53 AM

If it works with cyrillic in UTF-8, it should indeed also work with any other scripts.

This revision is now accepted and ready to land.Jun 17 2019, 9:53 AM
This revision was automatically updated to reflect the committed changes.
aacid added a subscriber: aacid.Jun 17 2019, 6:51 PM

if you're bored you can improve the code (it was bad before already, not your fault) removing the QByteArray( ) toUtf8 is already a bytearray