A man walks past Chinese and Hong Kong flags ahead of 20th anniversary of the handover from Britain to China, in Hong Kong, China June 27, 2017. REUTERS/Tyrone Siu

HONG KONG (Reuters Breakingviews) - China is flunking the soft-power test with Hong Kong. President Xi Jinping will visit the city to commemorate the 20-year anniversary of its triumphant return to Chinese control. But Beijing’s grip over hearts and minds in Hong Kong is weakening. That is a problem, since this a primarily ethnically Chinese, ruthlessly pragmatic city - people who one would expect to be sympathetic.

Graphic: 1997 handover: tmsnrt.rs/2tj2NKV

Hong Kong University surveys show increasing proportions of Hong Kongers no longer identify as Chinese. Localist sentiment has risen in the wake of massive pro-democracy protests in 2014. Judging by a subdued recent vigil, younger people now appear alienated to the extent they even view the bloody suppression of demonstrations in Beijing in 1989 as a Chinese event that has nothing to do with them.

That bodes ill for Xi’s “China Dream of National Rejuvenation”, with which he hopes to rally the Chinese diaspora to the Communist Party’s banner.

The wider world, watching how Beijing has reinterpreted its commitments to make Hong Kong more democratic, and to work within a “one country, two systems” framework, has good reason to distrust Xi’s intent.

In Hong Kong, China has revealed an unfortunate pattern duplicated in other countries: a preference for working with elites, popular or not; a willingness to use money - or force - to silence criticism; disregard for the rule of law when it doesn’t suit current needs; and a general disdain for the carrot when the stick will do.

The irony is that Beijing is spending as never before on “soft power,” a phrase best simplified as “convincing other people to like you, and to want what you want.” It is rolling state television stations out across Africa, buying newspapers in Australia and radio stations in the United States. The Confucius Institutes, an unapologetic propaganda effort, subsidize pro-China education around the world.

But this hasn’t drowned out headlines from Hong Kong. For all the spending, Pew Global Research polls show negative views of China have increased in recent years. Beijing can throw money around all it wants, but if even Hong Kong won’t buy the message China is selling, it is hard to see it travelling well elsewhere.