Unable to rename field name with degree (°)symbol

I have below config in brief, where i am trying to rename the field name to have a special character (degree symbol) but using it throws an error.

"'The following config files contains non-ascii characters but are not UTF-8 encoded".

config file:

input{
// from sql server

}
filter{
mutate{
rename=>{"temperature" => "Temperature(°C)}
}
output{
elasticsearch{
------------------
------------------
}
}
Can someone help me!

Is your configuration file UTF-8 encoded? The UTF-8 representation of the ° code point is C2 B0.

It wasn't before. After saving the conf file as UTF-8 encoding it worked.
Thanks for your reply.