Replaces junk character.
Moves common code to client api base module.