The return string of my dynamic library is GBK coded
jna use System.setProperty("jna.encoding", "GBK"). success!
how can I read the correct return string?
thanks!
jnr code:
SSCardDriver_API libcSI = LibraryLoader.create(SSCardDriver_API.class).load("SSCardDriver");
StringBuffer pOutInfo = new StringBuffer(1024);
int nCode = libcSI.iReadCardBas(3, pOutInfo);
log.debug("{}=iReadCardBas({},{})", nCode, 3, pOutInfo.toString());
-11=iReadCardBas(3,���������Ӵ�)
jna code:
System.setProperty("jna.encoding", "GBK");
Pointer pOutInfo = new Memory(1024);
int nCode = SSCardDriver_Library.INSTANCE.iReadCardBas(3, pOutInfo);
log.debug("{}=iReadCardBas({},{})", nCode, 3, pOutInfo.getString(0));
-11=iReadCardBas(3,读卡器连接错)
The return string of my dynamic library is GBK coded jna use
System.setProperty("jna.encoding", "GBK")
. success! how can I read the correct return string? thanks!jnr code:
jna code: