Sarkozy warmed up for his meeting with Hu by donning shorts
French President Nicolas Sarkozy has confirmed that he will attend the opening ceremony of the Beijing Olympics on 8 August.
The French president at one stage said he had not ruled out boycotting the Olympics in protest over Chinese actions in Tibet.
But, after meeting China's president at the G8 summit, he said he would attend.
Human rights groups have urged world leaders to condemn China's rights record by refusing to attend.
Meanwhile, China's President Hu Jintao thanked his US counterpart, George W Bush, who confirmed earlier this week that he would attend the opening ceremony in Beijing.
After talks with the US president at the G8 summit, Mr Hu said he "highly appreciated Mr Bush has on various occasions expressed his opposition to politicising the Olympic Games".
President Sarkozy stressed "the Olympic values of peace, friendship and brotherhood" at the meeting, according to a statement from his office.
France holds the EU presidency, and Mr Sarkozy plans to represent the 27-nation bloc at the ceremony in Beijing.
Mr Bush is going to the Olympics but other leaders plan to stay away
Following a crackdown on protests in and around Tibet in March, Mr Sarkozy had urged the Chinese leadership to hold talks with envoys of the exiled Tibetan spiritual leader, the Dalai Lama, and release political prisoners.
In March, he suggested his decision on attending the Games would hinge on progress in talks between the two sides.
But the French announcement of Mr Sarkozy's acceptance of the Olympic invitation made no mention of the Dalai Lama.
Two meetings between envoys from Tibet and China are reported to have already taken place with a third planned for October, according to French officials.
On Tuesday, China's ambassador to France said there would be "serious consequences" if Mr Sarkozy met the Dalai Lama when the Tibetan spiritual leader visits France in August.
Mr Sarkozy said he had discussed his decision with other European Union countries.
Germany's Chancellor Angela Merkel and Canada's Prime Minister Stephen Harper plan to stay away.
British Prime Minister Gordon Brown will not be present on 8 August, but plans to attend the closing ceremony.