Welcome to Questions - Ask OpenNMS, where you can ask questions and receive answers from other members of the community.

Bad conversion of OctectString

0 votes


I am having problems "reconverting" the octet string (from strings.properties) to a human readable string.

I am using the org.snmp4j.smi.OctetString but the conversion is not being well made.

For example I have the ifphysadd( collected in the strings.properties with the value: 0\uFFFD\uFFFDI\u0580

this should be the value:30:e4:db:49:d6:80

but it is converted to: 30:ef:bf:bd:ef:bf:bd:d6:80

I am just passing the string to the octetstring class and calling the toString() method.

I am doing something wrong?


OpenNMS version
Java version
oracle 1.7
Operating system
red hat
PostgreSQL version
asked Oct 1, 2014 by Russo (570 points)

Please log in or register to answer this question.