Take a clear photo of the page to make a digital copy. You can then test different code ideas on the image without touching the diary. It's the best way to keep the old paper from getting damaged.
Tbh "the best way to keep the old paper from getting damaged" sounds a bit much. Honestly, how much damage are we talking about? It's a diary, not the Declaration of Independence. A little smudging from turning pages isn't the end of the world. People act like every old book is a museum piece that'll crumble if you look at it wrong. Seems like overkill to me.
Honestly rayc94 has a point about it not being the Declaration of Independence. If it's just a personal diary from maybe fifty years ago, the paper is probably still pretty sturdy. I get what @ward.tara is saying with truly fragile stuff, but for most things, careful hands are enough. You don't always need to jump straight to scanning like it's a priceless artifact.
Ever seen an old newspaper crumble just from being opened? I tried to read my grandpa's war letters and the edges turned to dust. Now I scan anything fragile before I even touch it.