1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2025-04-05 20:13:00 +02:00

Fix unicode regex

This commit is contained in:
aclist 2022-09-14 22:10:27 +09:00
parent 9b64086f4a
commit c004032e52

View file

@ -949,7 +949,7 @@ munge_servers(){
local gameport=$(echo "$response" | jq -r '.[].gameport') local gameport=$(echo "$response" | jq -r '.[].gameport')
local qport=$(echo "$response" | jq -r '.[].addr' | awk -F: '{print $2}') local qport=$(echo "$response" | jq -r '.[].addr' | awk -F: '{print $2}')
#jq bug #1788, raw output cannot be used with ASCII #jq bug #1788, raw output cannot be used with ASCII
local name=$(echo "$response" | jq -a '.[].name' | sed 's/\\u[0-9]\{4\}//g;s/^"//;s/"$//') local name=$(echo "$response" | jq -a '.[].name' | sed 's/\\u[0-9a-z]\{4\}//g;s/^"//;s/"$//')
local players=$(echo "$response" | jq -r '.[].players') local players=$(echo "$response" | jq -r '.[].players')
local max=$(echo "$response" | jq -r '.[].max_players') local max=$(echo "$response" | jq -r '.[].max_players')
local map=$(echo "$response" | jq -r '.[].map|ascii_downcase') local map=$(echo "$response" | jq -r '.[].map|ascii_downcase')