Using a normal size panel mount encoder when breadboarding a new circuit can be somewhat inconvenient at best since the solder lugs are mostly too large and usually in the wrong location.
Bourns makes a series of encoders that are very useful for prototyping circuits on the plastic breadboard strips that are in common use. The 16mm rotary encoders that Bourns manufacturers are low in cost and available from many different distributors in 12 or 24 pulses per revolution, with or without a momentary switch.
These encoders have just the right height and solder lug spacing to allow a simple straight inline 0.1 inch pin header to be soldered to the front of the solder lugs. Since the lugs are spaced on 5mm (0.2 inch) centers, I used a header with five pins, removing two of the unneeded pins.
On the encoder with the momentary switch, a 0.1 in pin header can be soldered to the opposite side of the input pins where the switch connections are located.
On the encoder without the switch, a piece of bare 22 awg wire was soldered to the mounting lugs on each side and the wire was then formed to provide support on the opposite side of the input pins.
Finally, a simple and inexpensive knob can be created for these encoders from a 0.5 inch piece of 3/16 inch silicone tubing.