Measurement and interpretation of fermion-pair production at LEP energies of 183 and 189 GeV