12 feet is mighty long for encoder cables, though you can get away with it if things are quiet. The usual recommendation is no more than 6 feet, unless the encoders are differential output. Are those cables shielded? If not, they need to be. If they are, are the shields properly grounded - that is, ONLY at the end opposite the encoders?
The fact that you can run long signal wires if the power supply is local suggests you're getting noise in the power into the encoders. Have you tried putting capacitors on the power pins of the encoder? Usually two caps two decades apart is helpful - 0.1 & 0.001uF generally works well.
Regards,
Ray L.