Comment 2 for bug 1628761

Revision history for this message
Gavin Panella (allenap) wrote :

FWIW, http://paste.ubuntu.com/23275209/ (a short Python 3 script) makes me fairly sure that everything in netaddr's oui.txt is UTF-8. The script tries to guess the encoding of each entry using chardet, ignores those guessed as ASCII or UTF-8, then prints each entry after being decoded using the guessed encoding and again using UTF-8. The UTF-8 result always appears to be the better choice: http://paste.ubuntu.com/23275206/.

I mention this because it means that an upstream fix is probably easy, and because we may be able to monkeypatch something in the meantime. I do think the defensive approach you've taken in lp:~mpontillo/maas/netaddr-assumes-mac-oui-ascii--bug-1628761 is the right one for now though.

Of course, the example in the bug description is an exception to the rule: I can't find anything to decode that and produce something reasonable, though UTF-8 does at least offer a non-crashing option. I suspect it's been mangled, maybe by copy-and-paste at some indeterminate time in the past, and the original is now as good as unrecoverable from oui.txt. Similar corruption appears in the oui.txt that the ieee-data package installs.