Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with cyrillic symbols #162

Open
Dilitand opened this issue Oct 2, 2019 · 1 comment
Open

Not working with cyrillic symbols #162

Dilitand opened this issue Oct 2, 2019 · 1 comment

Comments

@Dilitand
Copy link

Dilitand commented Oct 2, 2019

Good day! Have problems with cyrillic symbols.
I have empty results on mp3 files when i used it.

For example, you will have empty spaces on Artist and Title if u make something like this:

Mp3File mp3file = new Mp3File("SomeMp3File.mp3");
if (mp3file.hasId3v2Tag())
{
id3v2Tag.setArtist("Киррилица Артист");
id3v2Tag.setTitle("Кирилица Титле");
mp3file.save("MyMp3File.mp3");
}

@jmizv
Copy link

jmizv commented Mar 20, 2021

Hi @Dilitand,

I've created this test method and it worked fine:

	@Test
	public void shouldWriteCyrillic() throws Exception {
		String filename = "WithCyrillic.mp3";
		String cyrillicArtist = "Киррилица Артист";
		String cyrillicTitle = "Кирилица Титле";

		try {
			Mp3File file = new Mp3File(MP3_WITH_ID3V1_AND_ID3V23_AND_CUSTOM_TAGS);
			ID3v2 id3v2Tag = file.getId3v2Tag();
			id3v2Tag.setArtist(cyrillicArtist);
			id3v2Tag.setTitle(cyrillicTitle);
			file.save(filename);

			Mp3File createdFile = new Mp3File(filename);
			assertTrue(createdFile.hasId3v2Tag());
			ID3v2 newTag = createdFile.getId3v2Tag();
			assertEquals(cyrillicArtist, newTag.getArtist());
			assertEquals(cyrillicTitle, newTag.getTitle());
		} finally {
			TestHelper.deleteFile(filename);
		}
	}

Maybe your issue has already been resolved?
Best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants