The dollar held firm on Wednesday, boosted by higher U.S. yields, and gaining on the Japanese yen as placid markets encouraged investors to resume carry trades, while the euro digested German inflation data.

The dollar reached as high as 157.41 yen early on Wednesday, inching back to levels that led to bouts of likely intervention from Tokyo at the end of April and early May, albeit rising at much slower pace than it did last month.

It was last at 157.10 yen, steady on the day.

"Generally, across Asian currencies, that relief rally post-CPI is starting to fade, as U.S. easing expectations are trimmed and some rocky bond auctions cause yields to climb back up, placing the yen and Chinese yuan under pressure," said Simon Harvey, head of FX analysis at Monex Europe.

Slightly softer U.S. consumer price inflation data this month weakened the dollar across the board. Since then, however, U.S Treasury yields have resumed their climb, with benchmark 10-year yields their highest in almost four weeks at 4.57%.

A lacklustre auction of two-year and five-year notes on Tuesday that raised doubts about demand for U.S. government debt, and data showing that U.S. consumer confidence unexpectedly improved in May, were the drivers of the move higher in yields.

The dollar was up 0.12% on the yuan traded offshore at 7.2774, a six week high.

"That continued weakness in the yuan is having knock-on effects on G10 currencies. Today's Australian inflation data should have been overwhelmingly positive for the Australian dollar," said Harvey.

The China-exposed Aussie dollar was down 0.3% at $0.6630 , even after Australian consumer price inflation unexpectedly rose to a five-month high in April, adding to risks that the next move in local interest rates might be up.

Also in the mix for the yen was the carry trade, where investors borrow in a low-yielding currency to invest in higher yielders.

"The yen remains under considerable downward pressure with carry appetite elevated due to low FX volatility," said Derek Halpenny, head of research global markets EMEA at MUFG in a note, pointing to elevated levels in euro/yen and sterling/yen.

The euro spent European trading reacting to German regional inflation data, dropping to a near two-year low on the pound of 84.84 pence.

It then recovered after nationwide data showed German inflation rose slightly more than expected to 2.8% in May, though a level that is unlikely to do anything to disrupt expectations for a European Central Bank rate cut next month.

The common currency was last flat versus the dollar at $1.0856, on track for its first monthly gain this year, and up a fraction on the pound at 85.15 pence.

The pound was a touch lower on the dollar at $1.2750, having hit a two-month high the day before, leaving the dollar index flat at 104.67. ($1 = 157.3100 yen)

(Additional reporting by Ankur Banerjee in Singapore; Editing by Jacqueline Wong, Kevin Liffey and Sriraj Kalluvila)