|
5 | 5 |
|
6 | 6 | import java.io.IOException;
|
7 | 7 | import java.nio.ByteBuffer;
|
| 8 | +import java.nio.charset.StandardCharsets; |
8 | 9 | import java.util.ArrayList;
|
9 | 10 | import java.util.Arrays;
|
10 | 11 | import java.util.List;
|
@@ -400,7 +401,7 @@ private void parseSegmentInfo(MatroskaElement infoElement) throws IOException {
|
400 | 401 | } else if (child.is(MatroskaElementType.TimecodeScale)) {
|
401 | 402 | timecodeScale = reader.asLong(child);
|
402 | 403 | } else if (child.is(MatroskaElementType.Title) && title == null) {
|
403 |
| - title = reader.asString(child); |
| 404 | + title = reader.asString(child, StandardCharsets.UTF_8); |
404 | 405 | }
|
405 | 406 |
|
406 | 407 | reader.skip(child);
|
@@ -453,11 +454,12 @@ private void parseSimpleTag(MatroskaElement simpleTagElement) throws IOException
|
453 | 454 | } else if (child.is(MatroskaElementType.TagString)) {
|
454 | 455 | // https://www.matroska.org/technical/tagging.html
|
455 | 456 | if ("title".equalsIgnoreCase(tagName) && title == null) {
|
456 |
| - title = reader.asString(child); |
| 457 | + title = reader.asString(child, StandardCharsets.UTF_8); |
457 | 458 | } else if ("artist".equalsIgnoreCase(tagName)) {
|
458 |
| - artist = reader.asString(child); |
| 459 | + artist = reader.asString(child, StandardCharsets.UTF_8); |
459 | 460 | } else if ("isrc".equalsIgnoreCase(tagName)) {
|
460 |
| - isrc = reader.asString(child); |
| 461 | + // probably not necessary to force a charset here |
| 462 | + isrc = reader.asString(child, StandardCharsets.UTF_8); |
461 | 463 | }
|
462 | 464 | }
|
463 | 465 | }
|
|
0 commit comments