Unable to rename fieldname containing unicode character

I’m trying to perform a rename of a field that has unicode character present and it doesn’t appear to be matching. I’ve tried to debug this to no avail
measurement = ‘CPU Package [°C]’
dest = “CPU Temperature”
snippet of the data (CSV headers btw)
CPU Package [°C],DIMM[1] Temperature [°C],DIMM[3] Temperature [°C]

How does the input to the processor look? Can you show the output of telegraf --test?

The windows command prompt & powershell windows don’t display the unicode character and just show the box with a question inside of it.

XXXXXXX,host=XXXXXXXX AC\ Power\ [Yes/No]=“Yes”,CPU\ Package\ [�C]=42i,Charge\ Level\ [%]=100i,Charging\ [Yes/No]=“No”,DIMM[1]\ Temperature\ [�C]=32.5,DIMM[3]\ Temperature\ [�C]=31.8,Discharging\ [Yes/No]=“No”,Estimated\ Runtime\ [min]=24.6,GPU\ Clock\ [MHz]=1365i,GPU\ Memory\ Clock\ [MHz]=7001i,GPU\ Power\ [W]=33.169,GPU\ Temperature\ [�C]=43i,Input\ Voltage\ [V]=115i,Power\ [W]=527.65,UPS\ Load\ [%]=61i 1576234956000000000

You will need to switch from measurement to field in the config:

    field = "CPU Package [°C]"
    dest = "CPU Temperature"

I’ved test with all three options prior doesn’t make any difference still not matching. Field, tag, or measurement. Using backslashes or just copy pasting what you have.

What input plugin are you using to get this data, is this the file input with csv parser?

yes that is correct.

It is possible that it is encoding related, the only encoding we support currently is UTF-8. Could you upload a trimmed down file, not the pasted contents and no more than a few lines, that causes the error and also include your config for the file input.

I’m not able to attach it to this post as I receive an error message saying it’s not available to new users…

I checked your file and it is encoded as ISO-8859, which is what is causing the issue later matching the degree symbol. I opened a new issue to track adding support for other encodings, Support non utf-8 encodings in the file input · Issue #6876 · influxdata/telegraf · GitHub, but for now the file would need converted ahead of time to utf-8.