As in the United States, Mr. Trump can be a polarizing figure in China. He has his share of critics, who mock him as egoistical and erratic, and for fanning the war flames with North Korea. But he also has many ardent supporters, which is perhaps a surprising development for the leader of China’s biggest geopolitical rival.

They refer to him as “Uncle Trump,” “Grand Commander” and “Donald the Strong.” After Mr. Trump’s visit to the Forbidden City on Wednesday with President Xi Jinping, one fan wrote on social media, “Long live Emperor Trump!”

Mr. Trump’s Chinese fans praise his irrepressible style, his skill as an entertainer and his willingness to say what he thinks. Many also like the fact that he seems less inhibited than previous American presidents about recognizing China as a superpower and as an equal on the global stage.

And after years of American presidents lecturing China on issues like political prisoners and democracy, many also say they are relieved to see a leader who seems to care more about making deals than idealism.

They say Mr. Trump has changed the tone of America’s conversation with China.

“People are sort of tired of listening to that criticism,” said Xu Qinduo, a political commentator for China Radio International in Beijing. “Now we can talk to each other.”