[Updated] Desoldering a roatry encoder

Its got three pins one side, two the other.

For the three pins one will be common, the other two are A and B phases.

For the two pins, that's the push-switch - one side is typically ground - from the traces you can see that one side is
routed to the middle of the 3, so that's likely to be the common one of the three.

But hey, why not check with a multimeter and avoid any guesswork??