eldy / AWStats

AWStats Log Analyzer project (official sources)
https://www.awstats.org
376 stars 120 forks source link

Could add "EncodeToPageCode" to the "geoip_asn_maxmind.pm" module? #53

Open sbridgett opened 7 years ago

sbridgett commented 7 years ago

Some ASN's returned by Geo-IPLite contain "iso-8859-1" encoded characters (eg. "ç" or c-cedilla), but with the awstats' PageCode set to "utf-8" these ASN characters are not being converted to utf-8. The city module "geoip_city_maxmind.pm" uses the function EncodeToPageCode() to convert cities to utf-8.

Could this be EncodeToPageCode() function also be used for ASN's, I think by:

In the module: "wwwroot/cgi-bin/plugins/geoip_asn_maxmind.pm" in subroutine: "ShowInfoHost_geoip_asn_maxmind"

after the line: "if (length($asn)>0) {"

add:
$asn = EncodeToPageCode($asn);