Unicode (UTF-8) support for Host Description (Alias)

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
mixmaxtw
Posts: 4
Joined: Sun Dec 04, 2005 10:47 pm
Location: Taiwan

Unicode (UTF-8) support for Host Description (Alias)

Post by mixmaxtw »

Urgent request:

please make cacti Unicode (UTF-8) safe, so that we can use non-Latin1 characters for Host Descriptions (Alias). Especially in East Asia this is a must.

I have cases where my customers want to use chinese characters as description.

This request might also reqire MySQL >=4.1 and the charset being set to utf8.

Currently when adding 200 hosts through the api_device_save() function with chinese characters in the description field, they end up garbled as Western Latin1 characters.

Also, please use only the Host IP (or hostname) as unique host identifier as this one is truely unique. The Alias (Description) should be optional and can be the same for multiple hosts (i.e. if they are in the same location for example)

In my environment I use utf-8 as locale encoding and as default MySQL encoding. Still cacti messes up the characters... :(
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

What version of rrdtool do you use. Does it affect both the Graphs and the User Environment? Post some graphics...

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
mixmaxtw
Posts: 4
Joined: Sun Dec 04, 2005 10:47 pm
Location: Taiwan

Post by mixmaxtw »

Ok, here are 4 screenshots.
I tested adding the hosts through command line batch processing and also manually through the webinterface. The result is the same.

RRDTool is version 1.0.49 and of course the characters there also appear garbled... I gues i have to upgrade rrdtool too.

But the webinterface and database handling should be taken care of first.

(I wiped out IPs and SNMP communities on the screenshots).
Attachments
batch adding through terminal (locale is set to en_US.UTF-8)
batch adding through terminal (locale is set to en_US.UTF-8)
Screenshot1.png (81.09 KiB) Viewed 2632 times
In MySQL the data appears garbled... -> has been treated as Latin1. Although the default setting for MySQL is UTF-8.
In MySQL the data appears garbled... -> has been treated as Latin1. Although the default setting for MySQL is UTF-8.
Screenshot2.png (78.4 KiB) Viewed 2632 times
Webbrowser: Devices list: same here, outout is garbled (Latin1). Webbrowser is set to Latin1 by default... :(
Webbrowser: Devices list: same here, outout is garbled (Latin1). Webbrowser is set to Latin1 by default... :(
Screenshot3.png (19.16 KiB) Viewed 2632 times
After switching the charset of the browser manually to UTF-8... also only garbage.
After switching the charset of the browser manually to UTF-8... also only garbage.
Screenshot4.png (17.71 KiB) Viewed 2632 times
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

you should give RRDtool 1.2 a try : it provides the DejaVuSansMono-Roman font ("variant of VeraMono with lots of added unicode glyphes").
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
mixmaxtw
Posts: 4
Joined: Sun Dec 04, 2005 10:47 pm
Location: Taiwan

Post by mixmaxtw »

fmangeant wrote:Hi

you should give RRDtool 1.2 a try : it provides the DejaVuSansMono-Roman font ("variant of VeraMono with lots of added unicode glyphes").
The problem is, that the data arrives garbled in the database and that the UI is not unicode safe... or maybe I should say 'not multibyte-safe'...

The rrdtools and the fonts is not the problem, I can provide that myself. The issue that the strings get garbled before they arrive in the database has to be fixed first.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests