Space distribution and energy straggling of charged particles via Fokker-Planck equation