British inflation surged to a new 40-year high in July on rising food prices, official data showed Wednesday, adding to