American shoppers, taking advantage of deep discounts and tax-free holidays, opened up their wallets a little more for back-to-school spending compared with last year, giving some retailers better-than expected gains for August.

The results provided a sliver of hope for the recovery amid an unrelenting batch of bad news, from slumping home prices and high unemployment, that have pointed to a stalling economy and set up dire expectations for the back-to-school shopping season. Still, the retailers' gains mask underlying weakness in consumer spending as they're being compared with declines a year ago and worries still abound about the critical holiday season.

Shoppers remain selective and are focusing on the necessities, a trend that is expected to continue through at least the holiday shopping season.

The International Council of Shopping Centers's index of 31 major retailers was up 3.2 percent in August, following a 2.8 percent gain in July. August's figure was a little better than the 3 percent increase forecast but is being compared with a 2.0 percent drop a year ago.

The figures are based on revenue at stores opened at least a year, considered a key measurement of retailer health because it excludes the effects of stores that open or close during the year.

In fact, spending on many nonessentials such as fashions is still below 2008 and are roughly equal to five years ago, according to MasterCard Advisors' SpendingPulse, which tracks all transactions including checks.

"We'll finish with an OK back-to-school season, but that's being compared with two back-to-back seasons of declines," said Michael P. Niemira, chief economist at International Council of Shopping Centers. "The overall retail industry isn't seeing enough (sales) lift to bring with it the entire industry."

As retailers reported results Thursday, Costco Wholesale Corp. posted a robust gain, boosted by higher gas prices and improved international revenue. Limited Brands Inc. and Macy's Inc. also had solid revenue increases. Still, a number of clothing stores such as Aeropostale Inc. and Gap Inc. had weak results. Target Corp.'s results came in below expectations.

Retailers, including many teen merchants, aggressively promoted jeans and other fashions in July as they sought to lure jittery shoppers in the stores. Tax-free holidays in nearly 20 states also helped attract customers.But still shoppers focusing on replenishing items and relentlessly hot weather depressed shoppers' appetite for buying fall items.

The Conference Board's monthly survey, released Tuesday, showed shoppers feeling slightly more optimistic in August than July - but not more than a year ago. And there's no reason in sight for them to feel better soon.

Home sales are plunging, and consumers are saving more and spending less as the unemployment rate remains stuck at almost 10 percent. The Labor Department is expected to report the fourth straight month of tepid job gains in the private sector on Friday.

"Consumers are buying what they absolutely need and are being very careful about it," said retail consultant Emanual Weintraub.

Costco said that revenue at stores open at least a year increased 7 percent in August, buoyed by higher gas prices and improved international revenue.

This topped the 4.2 percent rise analysts expected, according to by Thomson Reuters. But fourth-quarter and full-year revenue missed Wall Street expectations.

Target said sales of back-to-school items and food helped revenue in stores open at least a year rise 1.8 percent in August. But the discount retailer's results fell just short of expectations for a 2 percent increase. Food, health care and beauty items were the strongest sellers. Electronics and home decorations were weaker.

Wal-Mart Stores Inc. no longer reports revenue at stores opened a least a year on a monthly basis.

Limited, operator of Victoria's Secret and Bath and Body Works, posted a 10 percent gain in August. Analysts surveyed by Thomson Reuters, on average, expected the figure to rise 7.3 percent.

Gap said its key sales figure rose was flat in August, helped by better results at its Banana Republic chain.

Among department stores, Macy's said revenue rose in August as back-to-school shopping helped the company top Wall Street forecasts. Revenue from locations open at least a year rose 4.3 percent during the month.

J.C. Penney Co. had a 2.3 percent increase. Overall, men's and children's apparel were the top performing merchandise divisions during the month. Kohl's Corp.'s reoprted a better-than-expected 4.5 percent gain on strong sales of home and men's merchandise, and footwear.

Among teen retailers, Aeropostale Inc., hurt by the aggressive discounting at competitor Abercrombie & Fitch Co., struggled with a 1 percent decline, missing analysts' expectations of a 1.2 percent gain. The company said it had better results in peak back-to-school regions, showing shoppers are buying more close to when they need the items.

Abercrombie reported a 6 percent increase, slightly ahead of analysts' estimates for a 5.9 percent gain. But what helped drive business was a generous 40 percent discount, analysts say.