I
I
Ilya2017-11-01 07:03:05
Python
Ilya, 2017-11-01 07:03:05

How to convert octetstring to string?

I get a string via snmp, but it is in octetstring, how can I convert it to a regular string in python?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
longclaps, 2017-11-01
@Rimush

octetstring.decode("utf-8")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question