Handles unicode chars in host (custom) names and flow labels

Fixes #1290
This commit is contained in:
Simone Mainardi 2017-07-28 12:05:02 +02:00
parent 1b97ad41ee
commit e4accce602
7 changed files with 125 additions and 88 deletions

View file

@ -1082,19 +1082,6 @@ function getCategoryIcon(what, cat)
return(ret)
end
function abbreviateString(str, len)
if(str == nil) then
return("")
else
if(string.len(str) < len) then
return(str)
else
return(string.sub(str, 1, len).."...")
end
end
end
function bit(p)
return 2 ^ (p - 1) -- 1-based indexing
end
@ -1652,7 +1639,7 @@ function host2name(name, vlan)
return name
end
function flowinfo2hostname(flow_info, host_type, vlan)
function flowinfo2hostname(flow_info, host_type)
local name
local orig_name