Antwort: UTF8 Japanese characters in macros

チャンドラ mchandler at star.fielding.nec.co.jp
Thu Oct 19 02:10:44 CEST 2006


Sascha,

Thanks for the reply.

Yes, /usr/bin/printf works with the UTF8 strings I am trying to use.  I 
have tried /bin/echo as well (which also has no problems from the 
command line) with the same results, so I think it is a problem with way 
the strings are stored in the macro.

Martin

srunschke at abit.de wrote:
> 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