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
587 views

Hello,

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(1.3.6.1.2.1.2.2.1.6) 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
1.13
Java version
oracle 1.7
Operating system
red hat
PostgreSQL version
9.3
asked Oct 1, 2014 by Russo (560 points)

Please log in or register to answer this question.

...