[SNMP4J] Re:SNMP4J Digest, Vol 59, Issue 15 Does snmp4j support Unicode chars in trap?

He haobo haobohe at gmail.com
Wed Dec 31 07:37:24 CET 2008


Hi,

I also need to support Japanese, French, German charsets and so on. So is
there a way to identify which charset the snmp trap sender is using? Or is
there a direct method to constrct the String just like this:
 new String(((OctetString) vb[i].getVariable()).toByteArray());

You know, if I have to use something like "gb2312" in the codes, the
charsets will be hardcoded and is not a flexible way. Any suggestion for
this issue? Thanks.

Eternal


> You can try to transform the with apropriate charactor set.
>>
>> return new String(((OctetString) vb[i].getVariable())
>>       .toByteArray(), "gb2312");
>> _______________________________________________
>> SNMP4J mailing list
>> SNMP4J at agentpp.org
>> http://lists.agentpp.org/mailman/listinfo/snmp4j
>
>



More information about the SNMP4J mailing list