We investigate the constraints on the reionization history of the Universe from a joint analysis of the cosmic microwave background and neutral hydrogen fraction data. The tanh parametrization and principal component analysis methods are applied to the reionization history respectively. The commonly used tanh parametrization is oversimplistic when the neutral hydrogen fraction data are taken into account. Using the principal component analysis method, the reconstructed reionization history is consistent with the neutral hydrogen fraction data. With the principal component analysis method, we reconstruct the neutral hydrogen fraction at z =9.75 as xHI=0.6 9-0.32+0.30 for 6 <z <20 range reconstruction, and xHI=0.7 6-0.27+0.22 for 6 <z <30 range reconstruction. These results suggest that the Universe began to reionize at redshift no later than z =10 at a 95% confidence level.