European stocks eked out small gains on Wednesday against a background of investor caution globally following a dip in U.S. consumer sentiment.

The dollar was flat as were euro zone government bonds, with markets focusing on congressional testimony due later in the day from U.S. Federal Reserve Chairman Ben Bernanke.

World stocks as measured by MSCI were lower, primarily as a result of weakness in Asia where Japan's Nikkei lost nearly 1.5 percent.

Investors remained wary after Tuesday's sharp drop in U.S. consumer confidence and a fall in German business sentiment. U.S. consumer confidence in February slumped to a 10-month low as the short-term outlook on jobs worsened.

There's worry now that consumer confidence will affect spending, which would then affect the economy, said Nagayuki Yamagishi, a strategist at Mitsubishi UFJ Securities.

Investors are now expected to begin focusing on next week's U.S. monthly jobs data.

European shares, however, managed to buck the global trend following sharp losses in the previous session. Food producers drew buying as investors stuck with defensive stocks but banking stocks fell.

The pan-European FTSEurofirst 300 index of top shares was up 0.3 percent.

I think what Bernanke says today will govern the direction of markets for the next five weeks at least, said Howard Wheeldon, a strategist at BGC Partners.

DOLLAR FLAT

The dollar held gains against the euro but was generally flat against major currencies.

Higher-yielding currencies including the Australian dollar sank to a day's low in European trade after Asian shares fell.

The euro was at a near nine-month low versus the dollar at $1.3540.

There's ... some nervousness about what Bernanke is going to say today, said Johan Javeus, chief currency strategist at SEB in Stockholm.

The Fed needed to outline the significance of last week's raising of the Fed's discount rate for monetary tightening, Javeus said.

Euro zone government bond yields were barely changed, with investors on guard about sovereign risk.

Greek public and private sector unions were to strike on Wednesday against a wage freeze and tax rises imposed as part of the crisis-hit government's austerity plan.

(Additional reporting by Naomi Tajitsu; Editing by Susan Fenton)