Have the coalition lost the battle for hearts and minds in Afghanistan?

The international coalition have lost the battle for the "hearts and minds" of the Afghan people and so are losing the battle against the Taliban. So says the President of Pakistan, Asif Ali Zardari, in an interview with a French newspaper.
But President Obama disagrees. According to a Whitehouse spokesperson:
The Afghan people know of the brutality of Taliban.
According to a survey in Afghanistan in July by the International Council on Security and Development, Nato forces are losing the battle for hearts and minds with three quarters of people interviewed believing that foreigners disrespect their religion and traditions. However, more than half think Nato and the Afghan government are still winning the war.
And it could be that a new Taliban code of conduct which urges fighters to avoid killing civilians and forbids them from seizing weapons and money is having a positive effect on people's views.
Have the international coalition lost the battle for hearts and minds in Afghanistan?
Is there anything the coalition can do to win that battle?
