Skip to content

Commit

Permalink
Replace non-translated characters with underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaski committed Feb 4, 2022
1 parent 40f3812 commit 3acbe43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/core/utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,7 @@ QString UnicodeToAscii(QString unicode) {
iconv_close(conv);

QString ret(output_ptr);
ret = ret.replace('?', '_');

delete[] input_ptr;
delete[] output_ptr;
Expand Down
2 changes: 1 addition & 1 deletion tests/src/organizeformat_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_));

}

Expand Down

0 comments on commit 3acbe43

Please sign in to comment.