Version: 1.4.7 (using KDE KDE 3.5.7) Installed from: Gentoo Packages Compiler: GCC 4.1.2 When uploading songs to Generic Audio Device, characters with diacritics get translated to their ASCII counterparts in filenames. Howewer, most czech characters do not get translated resulting in messy filenames. This patch just adds some more characters to translate into clearPatch function to make czech users (or listeners of czech bands) happy. Note that this in not The Right Solution (©) (eg. it might be handled by some more complete library or so, but this is cheap and works)
Created attachment 21458 [details] amarok-1.4.7-convert-czech-accented-chars.patch mentioned patch against 1.4.7
Created attachment 21459 [details] screenshot showing non-transliterred characters before the patch
Created attachment 21460 [details] screenshot showing fixed filenames after the patch
Created attachment 21461 [details] testcase mp3 file with tags with czech accented chars
SVN commit 703986 by mitchell: Fix Czech character-to-ASCII translation for Generic Media Devices. Patch by Mate(j Laitl <strohel@gmail.com>. BUG: 149125 M +3 -2 ChangeLog M +13 -4 src/app.cpp --- branches/stable/extragear/multimedia/amarok/ChangeLog #703985:703986 @@ -4,13 +4,14 @@ VERSION 1.4.8 BUGFIXES: - * Fix transferring files with UTF8 names to MTP devices. Thanks to Kevin + * Fix transferring files with UTF8 names to MTP devices. Thanks to Kevin Becker <kevman3000@gmail.com> for the fix. (BR 139722) * Display warning that iPod sysinfo could not be written in the case of incorrect file permissions. Patch by Christian Ober-Blöbaum <cob@tzi.de>. (BR 148607) + * Fix Czech character conversion to ASCII for Generic Media Device. Patch + by Matěj Laitl <strohel@gmail.com>. (BR 149125) - VERSION 1.4.7 CHANGES: * Updated the Cool Streams. --- branches/stable/extragear/multimedia/amarok/src/app.cpp #703985:703986 @@ -1355,17 +1355,26 @@ result.replace( QChar(0x00fd), "y" ).replace( QChar(0x00dd), "Y" ); result.replace( QChar(0x00f1), "n" ).replace( QChar(0x00d1), "N" ); + // czech letters with carons + result.replace( QChar(0x0161), "s" ).replace( QChar(0x0160), "S" ); + result.replace( QChar(0x010d), "c" ).replace( QChar(0x010c), "C" ); + result.replace( QChar(0x0159), "r" ).replace( QChar(0x0158), "R" ); + result.replace( QChar(0x017e), "z" ).replace( QChar(0x017d), "Z" ); + result.replace( QChar(0x0165), "t" ).replace( QChar(0x0164), "T" ); + result.replace( QChar(0x0148), "n" ).replace( QChar(0x0147), "N" ); + result.replace( QChar(0x010f), "d" ).replace( QChar(0x010e), "D" ); + // accented vowels QChar a[] = { 'a', 0xe0,0xe1,0xe2,0xe3,0xe5, 0 }; QChar A[] = { 'A', 0xc0,0xc1,0xc2,0xc3,0xc5, 0 }; - QChar E[] = { 'e', 0xe8,0xe9,0xea,0xeb, 0 }; - QChar e[] = { 'E', 0xc8,0xc9,0xca,0xcb, 0 }; + QChar e[] = { 'e', 0xe8,0xe9,0xea,0xeb,0x11b, 0 }; + QChar E[] = { 'E', 0xc8,0xc9,0xca,0xcb,0x11a, 0 }; QChar i[] = { 'i', 0xec,0xed,0xee,0xef, 0 }; QChar I[] = { 'I', 0xcc,0xcd,0xce,0xcf, 0 }; QChar o[] = { 'o', 0xf2,0xf3,0xf4,0xf5,0xf8, 0 }; QChar O[] = { 'O', 0xd2,0xd3,0xd4,0xd5,0xd8, 0 }; - QChar u[] = { 'u', 0xf9,0xfa,0xfb, 0 }; - QChar U[] = { 'U', 0xd9,0xda,0xdb, 0 }; + QChar u[] = { 'u', 0xf9,0xfa,0xfb,0x16f, 0 }; + QChar U[] = { 'U', 0xd9,0xda,0xdb,0x16e, 0 }; QChar nul[] = { 0 }; QChar *replacements[] = { a, A, e, E, i, I, o, O, u, U, nul };
Great, thanks much.
Unfortunately nano performed a little UTF-to-ASCII conversion of its own...oh well. The ChangeLog has your name right, and that's what matters :-)
*** Bug 145828 has been marked as a duplicate of this bug. ***