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 x _ { \textsc { Hi~ { } } } = 0.69 ^ { +0.30 } _ { -0.32 } for 6 < z < 20 range reconstruction , and x _ { \textsc { Hi~ { } } } = 0.76 ^ { +0.22 } _ { -0.27 } 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 .