Feature #526
南昌三号线in_PIS插件发送中文信息要求转换为unicode码后发送
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
History
Updated by yufeng wu over 4 years ago
- Status changed from New to Resolved
协议增加支持win32和linux的GB2312向unicode转码功能
插件不用转码
Updated by yufeng wu over 4 years ago
- File 南昌三pis命令测试码.txt 南昌三pis命令测试码.txt added
150word有效字长消缺;
win版本调整测试消缺,
单个中文字高低字节序统一按前低后高处理
win+linux环境均已测试