#2871 strip the non-ascii characters

This commit is contained in:
openoms 2022-01-10 12:47:04 +00:00
parent 2bb53ceb96
commit ff3007c782
No known key found for this signature in database
GPG key ID: 5BFB77609B081B65

View file

@ -63,7 +63,9 @@ start_date=$(date -d "$date -$days days" +%s)
declare -A pubKeyAliasLookup
while IFS= read -r pubKey
do
alias=$(lncli --network $network --chain $chain getnodeinfo $pubKey | jq '.node.alias')
# strip the non-ascii characters with iconv
alias=$(lncli --network $network --chain $chain getnodeinfo $pubKey | jq '.node.alias'| iconv -f utf-8 -t ascii -c)
# remove quotes
alias=${alias:1:-1}
pubKeyAliasLookup[$pubKey]=$alias
# echo $pubKey : ${pubKeyAliasLookup[$pubKey]}