作者iFEELing (ing)
看板perl
标题[问题] 请问 Net::SNMP 处理中文字串问题
时间Thu Oct 19 22:13:48 2006
您好,在下利用 Net::SNMP 模组向所管设备做了 gettable 的要求,
传回一个 hash array , 然後 print 出来
但是 hash array 之中的英文字串可以正常显示,
中文字串却变成一串十六进位数字....
1.3.6.1.2.1.25.6.3.1.2.84 : 84 : LevelOne Projector Server Player 1.9.4
1.3.6.1.2.1.25.6.3.1.2.72 : 72 :
0x57696e646f777320585020a677a5fea9caa7f3b77320284b4239313433383829
1.3.6.1.2.1.25.6.3.1.2.55 : 55 :
0x57696e646f777320585020a677a5fea9caa7f3b77320284b4239303131393029
试着用过 pack("c",hex($str)) 但是亦不能正确显示。
想请教该如何把它变回中文字码??
感谢~
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 163.22.18.89