librenms/LibreNMS/Util
Tony Murray 8a883140cb
Infer character encoding for ifAlias and sysLocation (#13248)
* Infer character encoding for ifAlias and sysLocation
Tries to convert character encoding for non-UTF-8 encoded strings.
This will only work for snmp strings that are type-hinted, not ones forced to ASCII with -Oa or similar
Only works for your default charset or Windows-1251 or LATIN1.
You can set your character encoding in .env with CHARSET

Please save us all and just use UTF-8

* style fixes

* less Yoda

* ensure return type

* fall back to passed string

* don't convert strings with any unprintable characters (such as line return)

* Update LibreNMS/Util/StringHelpers.php

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>

* Fix CP850

* fix space

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2021-09-21 08:47:44 -05:00
..
Categorizer.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
CiHelper.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
Clean.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
CliColorFormatter.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
Colors.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
Debug.php Apply fixes from StyleCI (#13208) 2021-09-08 23:35:56 +02:00
Dns.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
DynamicConfig.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
DynamicConfigItem.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
EnvHelper.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
FileCategorizer.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
Git.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
GitHub.php reorganize release categories a bit (#13249) 2021-09-18 13:22:54 -05:00
Graph.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
Html.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
IP.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
IPv4.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
IPv6.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
Laravel.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
ModuleTestHelper.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
Number.php Apply fixes from StyleCI (#13208) 2021-09-08 23:35:56 +02:00
ObjectCache.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
OS.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
Rewrite.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
Smokeping.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
Snmpsim.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
StringHelpers.php Infer character encoding for ifAlias and sysLocation (#13248) 2021-09-21 08:47:44 -05:00
Time.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
Url.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
Validate.php Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
Version.php Bump version to 21.9.0 2021-09-16 22:45:07 -05:00