UTF-8 chars never displayed in get/walk output for 5.7.3

Mike Stupalov <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAHK261dy057zo=RmbiL5ewW87f2AvV06F3pMMTDexvaaN-05NQ@mail.gmail.com>
Hi,

 I already added bug report
(https://sourceforge.net/p/net-snmp/bugs/2815/), but probably issue need
additional discussion.

Server with net-snmp daemon, where I added some string with UTF8 chars
for testing purposes (but I know real system where used UTF8 chars).

My test string is: "Rue de la Métallurgie, 4530 Villers-le-Bouillet, België"

in old versions (seems as pre 5.7) I see correct UTF8 string in get/walk
requests

**NET-SNMP version: 5.4.3 (Ubuntu 12.04.5)**

SNMPv2-MIB::sysLocation.0 = STRING: Rue de la Métallurgie, 4530
Villers-le-Bouillet, België

**NET-SNMP version: 5.5 (CentOS 6)**

SNMPv2-MIB::sysLocation.0 = STRING: Rue de la Métallurgie, 4530
Villers-le-Bouillet, België

but for 5.7.x on different system, I see 2 dots instead each UTF8 chars:

**NET-SNMP version: 5.7.3 (Ubuntu 16.04.3)**
**NET-SNMP version: 5.7.3 (FreeBSD 10.3-RELEASE-p18)**

SNMPv2-MIB::sysLocation.0 = STRING: Rue de la M..tallurgie, 4530
Villers-le-Bouillet, Belgi..


I'm not C-guru, but I think this is DISPLAY-HINT conversion issue.

For such strings used textual conversion
SNMPv2-TC::DisplayString (DISPLAY-HINT "255a")

I compared code from 5.7.3 and 5.4.4 in snmplib/mib.c
and see string conversion cardinally changed for "a" and "t" hints.

And I think issue something in function sprint_realloc_asciistring().

I tried rebuild Ubuntu package with old code for hint conversion, and
issue is gone for me!

Probably some one can fix this more correctly with
sprint_realloc_asciistring()?


-- 
Sincerely yours,
Mike S. Stupalov, CTO NOC,
RU-CENTER Group (Northwest)
Phone: +7 981 8889951
E-mail: [email protected]

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.