Soaring prices and anti-foreigner sentiment have become central issues for much of Japan's electorate.