Zhang Xuecheng 章學誠 (1738-1801), courtesy name Shizhai 實齋, style Shaoyan 少巖, was a mid-Qing period philosopher and historian. He was a main representant of the Zhedong School 浙東學派. He hailed from Guiji 會稽 (modern Shaoxing 紹興, Zhejiang). Zhang Xuecheng was not a very good student in the beginning but he loved history and geography and was able to obtain the jinshi degree in 1778 that allowed him being appointed archivist (dianji 典籍) of the Directorate of Education (guozijian 國子監) and was a professor in the private academies of Dingwu 定武書院, Lianchi 蓮池書院 and Wenzheng 文正書院. All his life Zhang Xuecheng was interested in history and engaged himself as a teacher to many students.
He became a secretary of Bi Yuan 畢沅 (1730-1797), governor-general of Hu-Guang and a patron of scholarly studies, and was so allowed to take part in the compilation of the history Xu zizhi tongjian 續資治通鑒.
As a philospher, Zhang Xuecheng was of the opinion that a good student had to learn the Confucian Classics as well as matters of the contemporary world (jing shi 經世) and should not, as the Neo-Confucians had done, engage in metaphysical speculations about Heaven, the human character and the natural order (li 理). For Zhang Xuecheng, the Confucian Classics had a deep relationship with historiography, and only the study of both types of writings would help understanding man, society and the world. The Six Classics, he said, were nothing else than histories and had to be viewed as such, and not as divine books. Change in politics and the administrative system were quite necessary because of changing circumstances, and it was a fault to constantly adhere to the system described in the Confucian Classics. A good historian would have to know which moral principles guided history, to look for the reasons leading to an event, and to structure details that influenced further developments.
Zhang Xuecheng thus perpetuated a certain critique toward the Neo-Confucians that had already been brought forward by Huang Zongxi 黃宗羲 (1610-1695), who had argued that the Classics have to be combined with "the world" to reap practical benefits (jing shi zhi yong 經世致用).
Zhang Xuecheng was very interested in local history and revised and published quite a few local gazetteers. He said that there is not only a national or dynastic history but also that of a family and even that of a single person, each of which had to be presented by different historiographical types, namely biographies, family registers, and geographical history. The problem was was family registers and biographies were private affairs and not easy to find for the general reader or scholar. He also emphasized that a national or dynastic history had to be based on local history, for which reason local gazetteers were of immense importance.
Zhang Xuecheng was the first Chinese historian who wrote a kind of theory of the local gazetteer, the Zhouxian qingli zhi keyi 州縣請立志科議. Local gazetteers were, he said, an ideal instrument not only to provide historical material but also a help to revise errors, generalisations or misconceptions in national histories. This type of history was therefore to be seen as a national history in a smaller dimension, and not as a purely geographical treatise, as it was the case in all bibliographies from Ruan Xiaxu's 阮孝緒 (479-536) Qilu 七錄 to the collectanea Siku quanshu 四庫全書.
The most important writings of Zhang Xuecheng are Wenshi tongyi 文史通義, Jiaochou tongyi 校讎通義, Shijikao 史籍考 (lost), and the revised editions of the local gazetteers Hezhou zhi 和州志, Yongqing xian zhi 永清縣志, Bozhou zhi 亳州志, Hubei tongzhi 湖北通志, Changzhou fu zhi 常州府志 and Jingzhou fu zhi 荊州府志.