The dollar was flat against the euro on Friday, supported by a six-month high in U.S. consumer sentiment, even though an unexpected fall in retail sales last month and troubles in credit markets loomed.

The dollar fell against a basket of six major currencies for the sixth consecutive day, suffering the second-largest weekly decline this year, because of fears the U.S. subprime mortgage crisis could frighten foreign investors away from U.S. credit markets.

The boost in consumer sentiment for July did little to improve the market's perceptions of the dollar despite a surging U.S. stock market. Many traders still expect benchmark U.S. interest rates to stay on hold, while other central banks keep tightening monetary policy.

The U.S. dollar itself is the single biggest exception to the general resiliency that the global economy is demonstrating, which tends to be underappreciated by most observers, said Marc Chandler, global head of currency strategy with Brown Brothers Harriman.

The most compelling diagnosis of the dollar attributes its ailment to the fact that most market participants, including a strong majority of primary dealers, cannot see the Federal Reserve raising interest rates.

By late afternoon, the euro was flat on the day at $1.3780 after hitting a lifetime high of $1.3815 overnight, according to electronic trading platform EBS.

Sterling, though, rose to a fresh 26-year high against the dollar at $2.0366 after the morning's weak U.S. retail sales number. It last traded at $2.0335, up 0.2 percent on the day.

The dollar index was down modestly at 80.576 after earlier hitting a 2-1/2-year low of 80.442.

WAITING FOR THE OTHER SHOE

Yield differentials are expected to move to the dollar's detriment as persistent problems in the credit and housing sectors continue to plague the U.S. economy.

The Reuters/University of Michigan Surveys of Consumers said its preliminary July consumer sentiment index was the highest since January.

I still tend to think the other shoe has yet to drop in terms of the U.S. consumer, but it's difficult to get a good read on the longer-term trend, said Shaun Osborne, chief currency strategist at TD Securities in Toronto.

Short-term investors are wasting no time in mounting their bets against the dollar. Speculators have boosted their net short-dollar position to $23.9 billion in the week to July 10 from $3.3 billion about a month ago, according to data from the Commodity Futures Trading Commission.

Against the yen, the dollar was off its lows for the day at 121.92. It traded at 122.05, still down 0.2 percent from late on Thursday. For the week, the dollar fell 1.2 percent, the biggest decline since mid-March.

Analysts said gains in U.S. stocks have partly supported the dollar against the yen and minimized the impact of earlier news about Iran on the currency pair. A report on Thursday said Iran asked Japanese buyers of its crude oil to switch payment to yen from U.S. dollars as Tehran faces growing pressure from the West over its nuclear program.

With the Dow eyeing 14,000, that kind of mindset will make it difficult for dollar/yen to trade too much below 122, said David Mozina, head of foreign-exchange strategy at Lehman Brothers in New York.

Analysts said the subprime mortgage issue would continue to nag markets until the full extent of its impact was known, and would likely contribute to gains in the euro to $1.40.

This week, ratings agencies Standard & Poor's and Moody's Investors Service warned of downgrades to billions of dollars in risky mortgage debt, triggering the dollar's fall.