[Nagios-devel] a patch to allow non-ASCII character notification

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] a patch to allow non-ASCII character notification

Post by Guest »

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
[email protected]
Riki Network Systems Inc.






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked