The high precision of 0.1 arcsec required for the positioning of optical elements in new two-axes monochromators at the undulator beamlines at BESSY II has led to the development of UHV-compatible high-precision angle encoders. Mounted directly on the rotation axes, they provide substantial advantages over measuring systems connected outside the vacuum vessel. Making use of a fast closed-loop control system, an accuracy of 0.1 arcsec at a resolution of less than 0.01 arcsec has been experimentally verified.