a patch to allow non-ASCII character notification message

Ryoji Kobayashi ryoji at rikinet.co.jp
Mon Feb 4 15:24:02 CET 2008


Hi Nagios developers,

I found that Nagios 2.10 remove Japanese message from
notification e-mail.

I read your code and I found it is filtering out non-ASCII
characters in clean_macro_chars(). Could you apply the
following patch to your code?

----------
diff -r -c nagios-2.10-orig/base/utils.c nagios-2.10/base/utils.c
*** nagios-2.10-orig/base/utils.c	Tue May  1 06:22:32 2007
--- nagios-2.10/base/utils.c	Fri Jan 25 10:52:15 2008
***************
*** 4090,4096 ****

  		for(y=0,x=0;x<len;x++){
  			
! 			ch=(int)macro[x];

  			/* illegal ASCII characters */
  			if(ch<32 || ch==127)
--- 4090,4097 ----

  		for(y=0,x=0;x<len;x++){
  			
! 			/* ch=(int)macro[x]; */
! 			ch=macro[x] & 0xff;

  			/* illegal ASCII characters */
  			if(ch<32 || ch==127)
----------

We can use non-ASCII characters with this patch. I think it
is useful for Nagios users who use character encoding which
depends on MSB.

I appreciate if you apply it in the next release.

Regards,
-- 
Ryoji Kobayashi
ryoji at rikinet.co.jp
Riki Network Systems Inc.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/




More information about the Developers mailing list