in my junk drawer, I have a 5 or 6 rotorary encoders, the type you twist by hand. I can see no easy identification on the outside.
I took one apart to see if I could get an understanding of the pin outs, but I'm not sure and I wanted to post a couple of images to see if someone here could help.
As I opened it, I broke the wires to one of the ir devices, so you can only see one. There are two wires which run to the top to the other ir emitters or receivers, on the other side of the wheel.
On this device there are 4 pin outs at the 'front'.
At the 'back' there appear to be 2 ir send/recv pairs
under the board is a TI chip with 82C475K and HC14
on top there looks like there are a couple of trim pots
The pins at the ends are +5v and ground (but I can't tell which), the two in the middle are quadrature outputs. In the top picture, I think the resistor on the right is in series with the IR LED. If you use a multimeter to identify which side of the LED is the cathode, you can work out which way round +5v and ground are.