A magnetic encoder includes a multipolar magnet, having magnetic poles
formed therein so as to alternate with each other in a direction
circumferentially thereof, and a core metal supporting the multipolar
magnet. The multipolar magnet is prepared from a sintered element formed
by sintering a powdery mixture of a magnetic powder and a non-magnetic
metallic powder. This multipolar magnet is fixed to the core metal to
form a unitary component made up of the sintered element and the core
metal. The unitary component is subjected to a surface treatment for
anticorrosion.