Menu

#2655 snmputils don't print UTF-8 chars in SnmpAdminStrings

linux
open
nobody
utf-8 (2)
3
2018-05-11
2015-07-16
No

As reported on the users list (https://sourceforge.net/p/net-snmp/mailman/message/34240467/), UTF-8 strings are not properly printed. I set syscontact to "IQTV-ö05" in snmpd, and a snmpget of sysContact.0 prints a hex string.

Related

Bugs: #2815

Discussion

  • Josef Ridky

    Josef Ridky - 2016-10-05

    Is there any progress with printing of UTF-8 characters? Or do you have any hint, what should be done?

    Thanks

     
  • Robert Story

    Robert Story - 2016-10-06

    Start by reading about detecting UTF-8 (e.g. http://stackoverflow.com/questions/1031645/how-to-detect-utf-8-in-plain-c).

    Then you'll have to get up close and personal with sprint_realloc_octet_string in snmplib/mib.c to handle the 't' display hint and/or tweak the output guessing code.

     
  • Josef Ridky

    Josef Ridky - 2017-10-19

    I have tried to prepare some solution. What do you think about that?

     
  • Mike Stupalov

    Mike Stupalov - 2017-12-17

    I small improved your patch (since you use incorrect 4-byte Sequence). Should be 240-244.

    And I agree, this patch also fixed my issue: [#2815]

     

    Related

    Bugs: #2815


    Last edit: Mike Stupalov 2017-12-17
  • Bart Van Assche

    Bart Van Assche - 2018-05-11

    A fix has been checked in on the v5.7 and master branches. Please retest.

     

Log in to post a comment.

MongoDB Logo MongoDB