I would have definitely flipped it in software if I had the source.
Somebody asked which Bourns part I used. Actually, I'm not sure.
None of them have part numbers printed on the body.
My receipts file shows the following P/N's
PEC11R-4015F-S0024
PEC11L-4020F-S0020
PEC11L-4015F-S0015
They're all the PEC11 series. The "L" and "R" tell which way it rotates.
The "S" means they have a switch.
The "40" means that it has the right stick-out-the-back pins, and no detents.
The 0024 or 0020 or 0015 show how many pulses it produces per revolution.
https://www.bourns.com/pdfs/PEC11_obsolete.pdf