急急急!十进制ascii码转换成string时出现乱码,请问怎么解决?
我用spcomm采集数据,返回的是十进制ascii码,其中有大于128的数据,转换成string时出现乱码,要怎么解决,求大家帮忙啊
var hexbuf:array[1..2048] of byte; i:integer; recedata:Pchar;begin move(buffer^,pchar(@hexbuf)^,bufferlength);[color=#FF0000]//@hexbuf 中存储的十进制ascii码 @hexbuf(36,84,50,48,49,49,48,54,50,50,49,48,52,52,176,67,48,49,164,48,176.......)[/color] recedata:=@hexbuf;[color=#FF0000]//就是在这一步时,recedata中出现乱码( recedata=$T201106221048疌01??4595??癈02??3743??癈03??3729??癈04??3887??癈05??3396??癈 )[/color]...