In a photoelectric encoder including a scale (14, 16, 18) for making a
relative move and an image forming optical system (22, 24), adapted to
detect relative displacement of the scale, a transparent protective
material (40, 42) having a thickness t equal to or greater than the depth
of focus (DOF) of the image forming optical system is disposed on the
lattice (15, 17, 19) side surface of the scale. The transparent
protective material can be transparent tape 40 bonded to the lattice side
surface of the scale or a transparent protective material 42 applied to
the lattice side surface of the scale. The surface of the transparent
protective material can have hydrophilicity or lipophilicity.