Seems like I'm the only one facing this issue as there are no other reports of this on the forum. Everytime I use leafpad, the text file being edited gets corrupt, i.e. leafpad inserts some garbage characters, initially at the beginning of the file, subsequently other places as well. This happens even if I just open and close a file, without saving it.
Now I am only using nano for all editing, since sometimes I don't even realize that a file got corrupted when I use leafpad.
To reproduce, create a text file using leafpad:
# leafpad Documents/something.txt
type some stuff into the file, say "Hello world". Save and close the file, then from cli: