Qianziwen 千字文 "Thousand-characters text" is a character text book for elementary learning. There are two books with that title, namely one from the Liang period 梁 (502-557) written by Prince Xiao Zifan 蕭子範 (486-550) which is already lost, and one by Zhou Xingsi 周興嗣 (469-537), courtesy name Sizuan 思纂, from the same period.
The book was compiled on imperial order by using one thousand characters of the oeuvres of the famous calligrapher Wang Xizhi 王羲之 (303-361) from the Eastern Jin period 東晉 (317-420). Zhou selected one thousand different, oft-used characters and composed them to a long poem, of which each verse is 4 words or characters long. Each two verses rhyme, so that they are easily to remember. The words cover all aspects of nature and human life, and thus also serve to learn the most important characters of all fields, like the universe, history, self-cultivation, learning, eating and drinking, living, gardens, sacrifices, and much more.
The characters of the Qianziwen serve for numbering a large amount of chapters, books or other data. Each character represents a number, like 天=1, 地=2, 玄=3, 黃=4, 宇=5, 宙=6, 洪=7, 荒=8,... 焉=997, 哉=998, 乎=999, 也=1000. One example for this method is the numbering of the juan fascicles in some editions of the Daoist Canon Daozang 道藏.
There were several supplements or alternatives written:
Also called Fan-Tang qianzi wen 梵唐千字文, by the Tang-period 唐 (618-907) monk Yijing 義淨 (635-713), served as a help for the translation of Sanskrit (fan 梵) terms into Chinese, content wholly different than the original Qianziwen.
By Shiqi Wei 侍其瑋 or Shiqi Liangqi 侍其良器 (1022-1104) from the Song period 宋 (960-1279), with a preface written by Ge Wenkang 葛文康 (Danyang ji 丹阳集) and one by Ge Gangzheng 葛剛正, included in the series Yunzizaikan congshu 雲自在龛叢書 and Yiyuan milu chuke 藝園秘錄初刻.
Also called Sanxu qianwen 三續千文, by Ge Gangzheng 葛剛正, also from the Song period, with 8-syllable verses and commentaries, focusing on geography, personalities, self-cultivation and politics, included in the series Haiyuange congshu 海源閣叢書 and Changzhou xianzhe yishu 常州先哲遺書.
By the Song-period scholar Hu Yin 胡寅 (1098-1156), with a commentary by Huang Hao 黃灝; focuses on history, included in the series Yueyatang congshu 粵雅堂叢書.
By the Yuan-period 元 (1279-1368) scholar Xu Heng 許衡 (1209-1281), written in four-syllable verses, focuses on history. Included in the series Xu Wenzhenggong yishu 許文正公遺書, Xijing qinglu chongshu 西京清麓叢書 and Hongshitang shijingguan congshu 洪氏堂石經館叢書.
By Zhou Lüjing 周履靖 (1549-1640) from the late Ming period 明 (1368-1644), divided into the four parts Chuguang qianwen 初廣千文, Erguang qianwen 二廣千文, Sanguang qianwen 三廣千文 and Siguang qianwen 四廣千文, with one thousand characters per part. The second and third parts are in fact copies of Shi Qiwei's and Ge Gangzheng's books. To be found in the series Yimen guangdu 夷門廣牘.
By Li Deng 李登 (fl. 1576), also from the Ming period, focuses on the correct use of similar characters that are easy to confuse. The text is introduced by a short essay on standard writing, the Kaishu zifa 楷書字法 that explains the use of the character yong 永 as a standard for the shape of the eight different brush strokes (yong zi ba fa 永字八法, see script), and the meaning of radicals in Chinese characters. The text of the whole book is written in the three styles seal script (zhuanshu 篆書), grass script or cursive (caoshu 草書) and chancery script (lishu 隸書). Compared with the other thousand-character texts, Li Deng's book achieved not very many editions except the Kuibi Studio 奎壁齋 print. It is listed in the bibliography Qianqingtang shumu 千頃堂書目.
By He Guizhen 何桂珍 (1817-1855) from the Qing period, with a description of the teachings of the ancient Confucian masters. It was included in the canon of obligatory textbooks (Xunmeng bidu shu 訓蒙必讀書) and to be found in the Xijing qinglu congshu xubian 西京清麓叢書續編.
By Feng Sijing 馮嗣京 from the Qing period, which is actually the original text, in which the character jie 潔, which appears two times, is once replaced by the character shou 壽. There is an introduction into this version included in Xie Qikun's 謝啟昆 (1737-1802) book Xiaoxuekao 小學考.
By the Qing-period scholar Wang Xiaoyin 汪嘯尹, a word-by-word commentary of the original text, with additional explanation for each paragraph. Included in the collection Chongke Xushi sanzhong 重刻徐氏三種 (by Xu Shiye 徐士業, author of Sanzijing xungu 三字經訓詁).
By Sun Jixiu 孫枝秀 from the Qing period, a collection of 130 calligraphies of the original Qianziwen through the ages, mostly written in seal-script style (zhoushu 篆書), but also in very extraordinary writings styles like the script of the Utmost Extreme (taiji 太極), River Chart script (Hetu 河圖), eight-trigram script (bagua wen 八卦文), script from the River Luo (Luoshu 洛書), ancient seal script (zhouwen 籀文), bell-and-tripod script (zhongding wen 鍾鼎文), tadpole script (kedou wen 蝌蚪文), phoenix script (luanfeng shu 鸞鳳書), rice-ear script (huishu 穗書), dragon script (longshu 龍書), jewel-tripod seal script (baoding zhuan 寶鼎篆), carved-tallies seal script (kefu zhuan 刻符篆), small seal script (xiaozhuan 小篆), gold-bracelet script (jinchuan wen 金釧文), stone-drum script (shigu wen 石鼓文), standard script (kaizi 楷字), wild-goose script (yanzi 雁字) or fish-shaped or streamline script (weizi 瀢字). The preface was written by Xu Qianxue 徐乾學 (1631-1694) in 1679. The most important print it that from the Guangxu reign-period 光緒 (1875-1908) by the Shanghai Tongwen Press 上海同文書局. A modern edition was published during the Republican period by the Guji Shudian 古籍書店.
The Qianziwen belongs to the "canon" of elementary education, the San-Bai-Qian 三百千, which also includes the texts Sanzijing 三字經 and Baijiaxing 百家姓, and instead of the Qianziwen sometimes the poems anthology Qianjiashi 千家詩.
Some small "mixed-words" texts (zazi 雜字) imitating the pattern of the Qianziwen are: Jiejing zazi 捷徑雜字; Baoju zazi 包舉雜字; and Nongcun zazi 農村雜字 (also called Nongcun siyan zazi 農村四言雜字 or Nongcun riyong zazi 農村日用雜字).