I should have mentioned that, I as I recall, the encoder is a Bourne's PEC16 range.
Probably a PEC16-2220F-N0024
PEC16 encoder type
-2 = vertical mount with pins going down into the PCB
2 = 24 detents
20 = 20mm length (it could be a 15, you might need to mention)
F = shaft style
N = no built in push switch
0024 = number of pulses per 360deg.
Mouser, Digikey or RS all have them.
In my cheap way, I have sprayed contact cleaner down the shaft so it weeps between the screw threaded casting and the shaft into the encoder.
A few turns and it was OK for quite a while.
I have also carefully opened one up and cleaned it when the above didn't work so well.
They are the longest lasting encoder that Bourne makes as far as I know but a only cost a few dollars.
Replace yours today and brighten your display.
Royce