We consider diffraction of electromagnetic waves by an anisotropic cylindrical inhomogeneity located in a planar waveguide with perfectly conducting walls. Anisotropy is allowed for by using the uniaxial-crystal approximation. A rigorous analytical solution is represented in the form of double sums over eigenfunctions of a planar waveguide with perfectly conducting walls and azimuthal eigenfunctions of a cylinder. Different components of the intensity of the electric field scatttered by an anisotropic inhomogeneity are numerically calculated. The influence of the anisotropy and sizes of the inhomogeneity on the scattered field is analyzed.