Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.6k stars 398 forks source link

When using Chinese to search for graphics, garbled characters appear. #5696

Closed datutu58888 closed 3 months ago

datutu58888 commented 3 months ago

When inputting Chinese to search for graphics, garbled characters appear. After inputting the Chinese characters and pressing search, numbers and English garbled characters appear. The premise is that the name does not exist in the graphics library. If the name exists in the graphics library, the search can be performed normally using the regular expression method. Thank you so much 1.2.24 1.2.25 1.2.26 All three versions have this problem Screenshot_20240319_051303 Screenshot_20240319_051345

aliuzzz commented 3 months ago

The installation environment is php 8.0/8.1 mariadb 10.3/10.11 Same problem in them all

I don't know if this problem occurs in languages other than English, but under Chinese conditions, under the condition that the database is configured with utf8 format, this problem will occur. I think cacti is a good software for global users, and I hope it can be used in all languages

TheWitness commented 3 months ago

Follow this guide and if it works using UTF-8, create a pull request against 1.2.x.

https://stackoverflow.com/questions/18842075/decode-base64-string-php

TheWitness commented 3 months ago

I will closed your pull request. This is the correct solution 53fbb81ef53561896ecc46a63b4c5acf02586850

datutu58888 commented 3 months ago

I will closed your pull request. This is the correct solution 53fbb81

After testing, this problem is quite serious. English cannot be searched using regular expressions. A friend in the forum solved it.