使用FastReport的BarCode2D控件生成含中文的PDF417条形码

解决方法:设定CodePage为936

FastReport用户手册中关于CodePage的说明:

CodePage   This property is specific to the PDF417 and Datamatrix barcode. It determines the code page which is used to convert non-ASCII chars. For example, the default windows codepage  is 1251. 

此属性特定于PDF417和DataMatrix条码。它确定用于转换非ASCII的代码页字符。例如,默认的Windows代码页是1251。

Windows使用代码页(code page)来适应各个国家和地区。code page可以被理解是计算机使用的缺省编码方式。GBK对应的code page是CP936。

可以通过http://www.haomeili.net/QuYuDetail?wd=zh-CHS来查询相关信息。

ps:前段时间系统升级,不知到为什么突然又不能识别了。然后把codepage改成了65001后居然又可以,65001对应的是UTF-8。

原文地址:https://www.cnblogs.com/waterside/p/10738789.html