mike42 escpos-php,mike42 / escpos-PHP的UTF-8没有打印西里尔(mike42/escpos-php

我想打印Cyrillic我XPRINTER XP-58 pos打印机。

我想下面的代码,但它好好尝试打印所有的字母,如果是它打印的打印输出严重。 这是我得到的这个代码的结果,但不是所有的字母都丢失:----ЅЈКЉЊЌЃ---------快报

如果还有人有经验,在此,请帮助我。 先感谢您,

我的代码:

public function index()

{

$data = "";

$data['test'] = array(['А Б В Г Д Ѓ Е Ж З Ѕ И Ј К Л Љ М Н Њ О П Р С Т Ќ У Ф Х Ц Ч Џ Ш']);

$this->load->library("EscPos.php");

try {

$connector = new Escpos\PrintConnectors\WindowsPrintConnector("XP-58");

$profile = Escpos\CapabilityProfiles\DefaultCapabilityProfile::getInstance();

$printer = new Escpos\Printer($connector,$profile);

foreach ($data['test'] as $artikli){

$printer -> text(iconv("UTF-8","GBK//IGNORE", "$artikli[0]") . "\n");

}

$printer -> text("\n\n\n");

$printer -> cut();

/* Close printer */

$printer -> close();

} catch (Exception $e) {

echo "Couldn't print to this printer: " . $e -> getMessage() . "\n";

}

$this->load->view('welcome_message');

}

6c1555302777729326ca3efa0910d9ec.png

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值