question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default encoding of OctetString

See original GitHub issue

Hi!

The default defined encoding of a univ.OctetString seems to be ISO-8859-1 (see the code here). I was wondering why this choice was made, instead of something more universal, like UTF8?

This default encoding is causing some weird behavior in some programs relying on this library (see here or here).

Is it possible to change the default encoding to UTF8? If not, why not, and what do you suggest we can do to ensure proper encoding in our programs?

Thanks!

Y

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

1reaction
GIJackcommented, Jun 30, 2020

Hi, this is actually important because pyasn1 is buried in the dep chain for CrackMapExec, which in turn needs pywerview.

There are a whole bunch of people that depend on this to work as expected.

It should be noted, UTF-8 is the now favored internationalization standard. Please switch to this.

1reaction
the-useless-onecommented, May 12, 2020

Up, any info regarding this issue? Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

OCTET STRING - WebNMS
OCTET STRING specifies octets of binary or textual information. ... The SnmpString can be created using a specific character encoding using the following ......
Read more >
Octet String: What is it? - Stack Overflow
Binary files can be encoded into octetstrings and sent from a webbclient to a server in the form of an ASCII-string containing the...
Read more >
Overview of the Octet Encoding Rules (OER) - OSS Nokalva
In both cases, each character of the string is encoded in one octet (the highest-order bit is set to zero). 2.6 Encoding of...
Read more >
Working with Octet Strings | SnmpSharpNet
This is a standard way of terminating strings in C/C++ programming languages and some of the agents encode OctetString data without trimming this...
Read more >
OctetString type — ASN.1 types and codecs 0.4 documentation
... unicode object (Python 2) or str (Python 3) representing character string to be serialised into octets (note encoding parameter) or OctetString object....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found