I need to change some text values inside an after effect project file that I assume it’s a binary file. You cannot edit this file with a text editor, if you do next time you open it you will encounter the error message about corrupted project file.
So i need to for example change “TextArea1” to “Some new text” so as you see the length of the new text is not the same as the original one. should i use BinaryReader or something? how can i find the original String in Byte[] Array i get from this command…
As I’m a newbie in this field please tell me what should I do in this matter.
Have you got visual studio? If so, do:
At least you can see what’s in the file. This is at least a good starting point. It will show you the byte values, and any character value for the byte on the right-hand side.
As for how to edit the text, it all depends on what the format of the data is. I know you say it’s binary, but that isn’t a format, saying something is binary just means you don’t actually know what the format is. It might be that before a string (text) value, the previous byte gives the length of the text, so you could insert some more text and then increase this value. It might be that the length is stored in two or more bytes (because a byte can only hold values up to 256, and they might use two bytes for the format if they expect they might want text longer than 256). The format might after a piece of text have a byte that has the value 0 to mark the end of the text. Also, text may often be stored with one character in 1 byte, or 1 character in 2 bytes, or for some characters (mandarin etc), the number of bytes per characters can vary.
Good luck! The best advice is to try and track down someone who knows what the files format is. Tell us more about the file, what type is it? Has it got an extension.