When the meta data is written the copyright symbol is written as two characters (0xC2 0xA9) and then the 'm' is dropped off the end of the 4 digit type name. The resulting metadata entries are then not usable by other software.
I believe this is because the String is being stored as UTF-8 so the copyright symbol is encoded as two bytes in the String. A simple workaround is to specify the encoded character explicitly in all of the affected boxes:
public static final String TYPE = "\u00A9nam";
A better solution might be to use a char array/byte array to store the types, but that would involve changes up the class hierarchy.
I've had a problem writing metadata into an mp4 in an Android app using e.g.
AppleNameBox
. The problem stems from lines like:When the meta data is written the copyright symbol is written as two characters (0xC2 0xA9) and then the 'm' is dropped off the end of the 4 digit type name. The resulting metadata entries are then not usable by other software.
I believe this is because the String is being stored as UTF-8 so the copyright symbol is encoded as two bytes in the String. A simple workaround is to specify the encoded character explicitly in all of the affected boxes:
A better solution might be to use a char array/byte array to store the types, but that would involve changes up the class hierarchy.