From south Wales to eastern China a global crackdown is beginning.

Civil liberties advocates and government figures have drawn battle lines in a debate likely to affect the lives of millions of people.

Is it acceptable to wear pajamas out in public?

The answer, according to Tesco and the government of Shanghai, is no.

In Cardiff, Elaine Carmody was escorted off the premises of her local supermarket after falling foul of foul of a new dress code that prohibits nightwear.

The rules were brought in after members of the public complained that the sight of people pushing carts in their PJs made them feel uncomfortable and embarrassed.

Those entering the Tesco supermarket are now greeted by signs headed Tesco Dress Code Policy. “To avoid causing offence or embarrassment to others, we ask that our customers are appropriately dressed when visiting our store (footwear must be worn at all times and no nightwear is permitted),” the rules decree.

“I’ve got lovely pairs of pajamas, with bears and penguins on them. I’ve worn my best ones today, just so I look tidy,” said Carmody, 24, who had chosen the comfortable option for a quick trip to buy a pack of cigarettes.

“If you’re allowed to wear jogging bottoms, why aren’t you allowed to wear pajamas in there, that’s what I don’t understand. It is ridiculous and stupid. I go in other shops in my pajamas and they don’t say anything.”

Over 5,000 miles away in Shanghai the shopping list is different but the sentiment is the same.

“It’s convenient to wear pajamas. If I need to pop out for a bottle of soy sauce at the supermarket I can’t be bothered to get changed,” said Nie, one of the many middle aged ladies in the who go to the store in their nightwear.

Shoppers, mahjong players and those walking their dogs are known to stay in sleepwear while walking the streets of China’s glitziest metropolis.

But Shanghai residents’ preference for pyjamas also is under threat following the launch of a government campaign to encourage people to dress properly in the run up to the 2010 World Expo fair that will open in the city on May 1.

The “No Pajamas in Public, Be Civilized for the Expo” slogan has triggered nationwide debate. While it may be the target of state opprobrium, the pro-pajamas faction does not seem to have lost ground in the realm of public opinion.