To substantially eliminate deficiencies such as portions of the resinous
coating, where the film thickness is reduced considerably during the
press-fitting, and to aim at providing a high productivity with a reduced
cost and without the possibility of occurrence of rusting after a
prolonged time of use under severe environmental conditions due to an
excellent anticorrosive property, a magnetic encoder (10) includes a
multipolar magnet (14) having a plurality of alternating magnetic poles
alternating with each other in a direction circumferentially thereof, and
a core metal (11) supporting the multipolar magnet (14). The multipolar
magnet (14) is formed of a sintered element prepared by mixing and
sintering a powdery mixture of a magnetic powder and a non-magnetic
metallic powder. The multipolar magnet (14) is fixed on the core metal
(1) by staking a portion of the core metal (11), and a sintered
element/core metal assembly (21) fixed on the core metal (11) is surface
treated to have with an anticorrosive resinous coating (22) for
anticorrosive purpose. When the magnetic encoder is press-fitted on an
encoder carrier member, one of a press-fitting punch and the magnetic
encoder (10) is heated to a temperature within the range of 60 to
150.degree. C.