Replace non-translated characters with underscore
This commit is contained in:
parent
40f381257d
commit
3acbe431f7
|
@ -823,6 +823,7 @@ QString UnicodeToAscii(QString unicode) {
|
|||
iconv_close(conv);
|
||||
|
||||
QString ret(output_ptr);
|
||||
ret = ret.replace('?', '_');
|
||||
|
||||
delete[] input_ptr;
|
||||
delete[] output_ptr;
|
||||
|
|
|
@ -177,7 +177,7 @@ TEST_F(OrganizeFormatTest, ReplaceNonAscii) {
|
|||
EXPECT_EQ("Royksopp", format_.GetFilenameForSong(song_));
|
||||
|
||||
song_.set_artist(QString::fromUtf8("Владимир Высоцкий"));
|
||||
EXPECT_EQ("????????_????????", format_.GetFilenameForSong(song_));
|
||||
EXPECT_EQ("_________________", format_.GetFilenameForSong(song_));
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue