Antwort: UTF8 Japanese characters in macros

srunschke at abit.de srunschke at abit.de
Wed Oct 18 10:12:05 CEST 2006


nagios-users-bounces at lists.sourceforge.net schrieb am 18.10.2006 04:26:19:

> /usr/bin/printf "%b" "***** Nagios  *****\n\nNotification Type:
> $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress:
> $HOSTADDRESS$\n$HOSTNOTES$\n\nInfo: $HOSTOUTPUT$\n\nDate/Time:
> $LONGDATETIME$\n" | /usr/bin/mail -s "Host $HOSTSTATE$ alert for
> $HOSTNAME$!" $CONTACTEMAIL$
[SNIP]
> Both printf and mail work fine with UTF8 japanese, and tests using only
> the $HOSTNOTES$ macro yeilds similar results (nothing output).
> The CGI's work fine, and display the japanese, so it seems the macro
> processing is not able to handle the characters.
> 
> Has anyone had similar problems, and is there a solution?

I can't try the japanese UTF, but are you sure that /usr/bin/printf
supports UTF8? Typing printf at the shell is not the same as using
/usr/bin/printf. The bash built-in printf function is very different
from the external executable and has caused lots of headaches to me
already. It might be the source of your problem too.

Sascha

PS: This problem is one of the reasons I strongly discourage the current
standard of how default notifications are generated...

--
Sascha Runschke
Netzwerk Management
IT-Services

ABIT AG
Robert-Bosch-Str. 1
40668 Meerbusch

Tel.:+49 (0) 2150.9153.226
Mobil:+49 (0) 173.5419665
mailto:SRunschke at abit.de

http://www.abit.net
http://www.abit-epos.net
---------------------------------
Sicherheitshinweis zur E-Mail Kommunikation /
  Security note regarding email communication:
http://www.abit.net/sicherheitshinweis.html

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list