-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
telegraf.conf cannot be parsed if saved with notepad (UTF8 BOM) #1378
Comments
Sorry @StianOvrevage but I have to agree with @Pomyk. I would recommend using Notepad++ which doesn't save with a BOM. It's a slippery slope to litter the codebase with special handling of little Windows-isms like this.... http://www.larshaendler.com/2015/01/20/remove-bom-with-notepad/ |
I understand from your point of view. But alas it is quite a hassle for Windows server operators to not be able to edit config files with any native Windows program, and I suspect to be a barrier to adoption and source of frustration. |
fair enough......I can make it skip the first byte in certain cases :/ |
You rock! :D |
Default windows text editor (Notepad) adds a BOM to the beginning of the file. This needs to be trimmed otherwise we will get an "invalid toml" error. see influxdata/telegraf#1378 and http://utf8everywhere.org/#faq.boms
Default windows text editor (Notepad) adds a BOM to the beginning of the file. This needs to be trimmed otherwise we will get an "invalid toml" error. see influxdata/telegraf#1378 and http://utf8everywhere.org/#faq.boms
The toml error also appears if the file is edited in Powershell ISE with psedit. To get around the error in 1.5.2, I opened the .conf in Notepad++, converted to UTF-8 and saved the conf file. |
When editing telegraf.conf with notepad the file is encoded in UTF-8 BOM and telegraf cannot get past the BOM and quits with:
Error parsing telegraf.conf, toml: line 1: parse error
So, it would be nice to have the config loader/parser accept UTF-8 BOM encoded files.
The text was updated successfully, but these errors were encountered: