Volkswagen's global headquarters in Wolfsburg, Germany. Image source: Volkswagen.

Volkswagen (VWAGY -0.93%) said on Wednesday that it beat profit forecasts for the first half of the year, thanks in part to successful cost-cutting efforts and a jump in sales in Europe. But it also took a hefty charge to cover costs related to its diesel-emissions scandal.

Better-than-expected earnings -- and another big charge for the diesel mess

VW isn't scheduled to release its full first-half earnings report until July 28. But it chose to release what it called an ad hoc announcement to say that its first-half operating income before special items is significantly higher than expected -- and to announce another charge related to the diesel scandal. 

Operating income before special items totaled 7.5 billion euros ($8.2 billion) in the first half of 2016, up 7% from a year ago. But that number will be reduced by a charge of 2.2 billion euros ($2.4 billion) "mainly related to further legal risks predominantly arising in North America," VW said. 

Its income exceeded expectations because of "improvements as a result of the Volkswagen brand," which had posted weak sales in the first quarter. The improvements were driven by seasonal factors, a stronger new-car market in Europe, and some large corporate fleet orders. VW also said that ongoing cost-cutting program had a positive effect. 

First-quarter operating income totaled 3.4 billion euros, including special items. 

Why VW is setting aside even more money for its diesel scandal

VW had already set aside about $18 billion to cover costs related to its massive emissions-cheating scandal, mostly involving vehicle recalls and settlements with regulatory authorities and vehicle owners in the U.S. 

But it's no surprise that VW felt the need to boost its reserves again. While its settlement deal covered civil violations and lawsuits related to the roughly 482,000 vehicles powered by a 2.0 liter four-cylinder diesel engine in the U.S., VW still faces charges and litigation related to another roughly 100,000 VW brand, Audi, and Porsche vehicles powered by a 3.0 liter V6 version of its "TDI" diesel.

VW is also still facing an investigation by the U.S. Department of Justice that could result in criminal charges. And the company was sued Tuesday by the attorneys general of New York, Massachusetts, and Maryland, who allege that VW has covered up evidence of emissions cheating for much longer than it has so far admitted. 

VW's full-year outlook is still subdued

VW's ad hoc statement also said that its full-year outlook is unchanged. It still expects revenue to be down as much as 5% from year-ago levels, and an operating margin of between 5% and 6%. It continues to be concerned about difficult economic conditions in South America and Russia, exchange-rate volatility, and potential further costs related to the diesel-emissions mess.