  Fragmentation functions are determined for the pion and kaon by global
analyses of charged-hadron production data in electron-positron annihilation.
Accurate measurements were reported by the Belle and BaBar collaborations for
the fragmentation functions at the center-of-mass energies of 10.52 GeV and
10.54 GeV, respectively, at the KEK and SLAC B factories, whereas other
available $e^+e^-$ measurements were mostly done at higher energies, mainly at
the $Z$ mass of 91.2 GeV. There is a possibility that gluon fragmentation
functions, as well as quark fragmentation functions, are accurately determined
by scaling violation. We report our global analysis of the fragmentation
functions especially to show impacts of the B-factory measurements on the
fragmentation function determination. Our results indicate that the
fragmentation functions are determined more accurately not only by the scaling
violation but also by high-statistical nature of the Belle and BaBar data.
However, there are some tensions between the Belle and BaBar data in comparison
with previous measurements. We also explain how the flavor dependence of quark
fragmentation functions and the gluon function are separated by using
measurements at different $Q^2$ values. In particular, the electric and weak
changes are different depending on the quark type, so that a light-quark flavor
separation also became possible in principle due to the precise data at both
$\sqrt{s}\simeq 10.5$ GeV and 91.2 GeV.
