[en] Using a linear combination of atomic orbitals approach, we report a systematic comparison of various density functional theory (DFT) and hybrid exchange-correlation functionals for the prediction of the electronic and structural properties of prototypical ferroelectric oxides. It is found that none of the available functionals is able to provide, at the same time, accurate electronic and structural properties of the cubic and tetragonal phases of BaTiO3 and PbTiO3. Some, although not all, usual DFT functionals predict the structure with acceptable accuracy, but always underestimate the electronic band gaps. Conversely, common hybrid functionals yield an improved description of the band gaps, but overestimate the volume and atomic distortions associated with ferroelectricity, giving rise to an unacceptably large c/a ratio for the tetragonal phases of both compounds. This supertetragonality is found to be induced mainly by the exchange energy corresponding to the generalized gradient approximation (GGA) and, to a lesser extent, by the exact exchange term of the hybrid functional. We thus propose an alternative functional that mixes exact exchange with the recently proposed GGA of Wu and Cohen [Phys. Rev. B 73, 235116 (2006)] which, for solids, improves over the treatment of exchange of the most usual GGA's. The new functional renders an accurate description of both the structural and electronic properties of typical ferroelectric oxides.