From 942e118e4d4d78c3577140cfb4d2626631cbda3a Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Wed, 10 Feb 2021 13:48:53 +0000 Subject: [PATCH] #762 wide character error on deploy with local oui.txt --- Changes | 1 + bin/netdisco-deploy | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index d4ae8f61..f025c802 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,7 @@ [BUG FIXES] * #740 more robust log rotation + * #762 wide character error on deploy with local oui.txt 2.047002 - 2020-12-30 diff --git a/bin/netdisco-deploy b/bin/netdisco-deploy index 8713f21d..f99f6f1b 100755 --- a/bin/netdisco-deploy +++ b/bin/netdisco-deploy @@ -225,7 +225,7 @@ sub deploy_oui { my %data = (); if (@ARGV) { - @lines = File::Slurper::read_lines($ARGV[0]); + @lines = File::Slurper::read_lines($ARGV[0], 'iso-8859-1'); } else { my $url = 'https://raw.githubusercontent.com/netdisco/upstream-sources/master/ieee/oui.txt'; @@ -275,7 +275,7 @@ sub deploy_oui { sub shorten { my $manuf = shift; - $manuf = decode("utf8", $manuf, Encode::FB_CROAK) unless @ARGV; + $manuf = decode("utf8", $manuf, Encode::FB_CROAK); $manuf = " " . $manuf . " "; # Remove any punctuation