2

我编写了一些 Perl 代码来从文件中读取数据并对其进行处理并将其打印到浏览器。

样本内容:

Delhi[##DELIM##]Delhi,National Capital Territory of India,\u0926\u093F\u0932\u094D\u0932\u0940 \u062F\u0647\u0644\u06CC \u0A26\u0A3F\u0A71\u0A32\u0A40[##DELIM##]Place,PopulatedPlace,Settlement,Place,_Feature[##DELIM##]Delhi is a metropolitan region in India that includes the national capital city, New Delhi. It is India's second-most-populous city after Mumbai, and the largest city in terms of area. With a population of 22\u00A0million in 2011, the city is the fourth-largest city in the world. The NCT and its urban region have been given the special status of National Capital Region (NCR) under the Constitution of India's 69th amendment act of 1991.[##DELIM##]http://upload.wikimedia.org/wikipedia/commons/thumb/a/a1/Delhi_Montage.jpg/200px-Delhi_Montage.jpg[##DELIM##]AreaCode: +91 11[##NEWLINE##]HomePage: http://delhi.gov.in[##NEWLINE##]NickName: Dilli (Hindi: \u0926\u093F\u0932\u094D\u0932\u0940, Urdu: \u062F\u0650\u0644\u0651\u06CC, Punjabi: \u0A26\u0A3F\u0A71\u0A32\u0A40)[##DELIM##]

我正在使用分隔符拆分内容[#DELIM#]并将不同的组件(如名称、描述和其他一些信息)打印到浏览器。此文件包含一些 Unicode 字符,并且内容在浏览器中无法正确显示。如何在 Perl 或 C++ 中处理它?

4

0 回答 0