Project

General

Profile

Feature #526

南昌三号线in_PIS插件发送中文信息要求转换为unicode码后发送

Added by yufeng wu over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Start date:
04/26/2020
Due date:
% Done:

0%

Estimated time:

Description

根据南昌三号线PIS接口协议(北京冠华)要求
需要中文按unicode码发送
QTISCS3.0版

现场要求在20200504前提交使用
以下转换函数已在in_pis的CPisCtrlDlg::OnBtnOpen()和CPisCtrlDlg::OnBtnSend()验证转换OK
void Ascii2UnicodeLen(char*src,int len,unsigned short*tar) {
unsigned int word_cnt;
word_cnt=MultiByteToWideChar(0,0,src,len,tar,len);
tar[word_cnt]=0;
}
void Ascii2Unicode(char*src,unsigned short*tar) {
unsigned int n;
n=MultiByteToWideChar(0,0,src,(unsigned int)-1,0,0);
MultiByteToWideChar(0,0,src,(unsigned int)-1,tar,n);
tar[n]=0;
}


Files

南昌三pis命令测试码.txt (7.73 KB) 南昌三pis命令测试码.txt yufeng wu, 05/12/2020 01:22 PM

History

#1

Updated by yufeng wu over 4 years ago

  • Status changed from New to Resolved

协议增加支持win32和linux的GB2312向unicode转码功能
插件不用转码

#2

Updated by yufeng wu over 4 years ago

150word有效字长消缺;
win版本调整测试消缺,
单个中文字高低字节序统一按前低后高处理
win+linux环境均已测试

Also available in: Atom PDF