Special characters in /etc/nagios/resource.cfg - how do i mask them?

I have a problem in check_mk 1.5.0p19:

I have special characters in my resource.cfg file, each time i do a cmk -R i got the following error:

Generating configuration for core (type cmc)...Error creating configuration: 'ascii' codec can't decode byte 0xc2 in position 17: ordinal not in range(128)

any kind of hint is welcome!

Looks like my issue here:

And also here:

But it seems no one knows how to solve…

Hello Flavio,

Thank you for your answer.

It looks like a python error message. Have a look at https://docs.plone.org/4/en/manage/troubleshooting/unicode.html, they say:

This is usually because you are trying to output/store unicode data using outdated methods, e.g.

* printing,
* logging,
* using 7-bit ids ...

What i want to say is, our error-messages are looking equal, but they may have totally different reasons. I just want to use a user macro in the resource.cfg file. User macros are used for passwords. My password is very complex with a lot of special characters. I don’t know if there is a way to escape some of these special characters.

It might be a solution to change the illegal_macro_output_chars described here, but i do not know if it is the right way.

Kind regards
Oliver