- Posts: 34
- Thank you received: 0
Linuxcnc always wants to update my INI file
6 years 9 months ago #154668
by DC67
Replied by DC67 on topic Linuxcnc always wants to update my INI file
i did it via the selection menu but i had the same problem
Please Log in to join the conversation.
6 years 9 months ago #154694
by andypugh
Replied by andypugh on topic Linuxcnc always wants to update my INI file
Can you zip up the config folder and attach it, I will see if I can tell what is going on.
Please Log in to join the conversation.
6 years 9 months ago #154716
by DC67
Replied by DC67 on topic Linuxcnc always wants to update my INI file
Hello
Here is config zip
Here is config zip
Attachment not found
Please Log in to join the conversation.
6 years 9 months ago #154719
by andypugh
Replied by andypugh on topic Linuxcnc always wants to update my INI file
This looks like a bug with the "GetFromIni" code in Linuxcnc
The simple workaround for you is to add a blank line (or a comment) before the [EMC] section of the INI.
For some reason if the very first line in the file is the [EMC] section it fails to find it.
I will try to fix that.
But you should be able to just add a line to Fenja.ini and all will be well.
The simple workaround for you is to add a blank line (or a comment) before the [EMC] section of the INI.
For some reason if the very first line in the file is the [EMC] section it fails to find it.
I will try to fix that.
But you should be able to just add a line to Fenja.ini and all will be well.
Please Log in to join the conversation.
6 years 9 months ago #154721
by dgarrett
Replied by dgarrett on topic Linuxcnc always wants to update my INI file
I think the problem is that the ini file was edited with
some program that adds a BOM "byte order mark" (efbb bf) at
the beginning of the file and the parsing in inifile.cc does
not handle BOMs -- not expected in linux.
Ref: en.wikipedia.org/wiki/Byte_order_mark
A brief web search notes that the dos2unix program fixes this:
some program that adds a BOM "byte order mark" (efbb bf) at
the beginning of the file and the parsing in inifile.cc does
not handle BOMs -- not expected in linux.
Ref: en.wikipedia.org/wiki/Byte_order_mark
A brief web search notes that the dos2unix program fixes this:
Code:
$ xxd Fenja.ini |head -1
00000000: efbb bf5b 454d 435d 0a23 2054 6865 2076 ...[EMC].# The v
$ dos2unix Fenja.ini
$ xxd Fenja.ini |head -1
00000000: 5b45 4d43 5d0a 2320 5468 6520 7665 7273 [EMC].# The vers
Please Log in to join the conversation.
6 years 9 months ago #154727
by andypugh
Replied by andypugh on topic Linuxcnc always wants to update my INI file
I did look for whitespace in the editor, but the BOM is new to me.
But would certainly mess up the parser that looks for a lie beginning [EMC]
That said, a blank line fixes the issue easily, moving the BOM to an irrelevant line.
But would certainly mess up the parser that looks for a lie beginning [EMC]
That said, a blank line fixes the issue easily, moving the BOM to an irrelevant line.
Please Log in to join the conversation.
6 years 9 months ago #154766
by DC67
Replied by DC67 on topic Linuxcnc always wants to update my INI file
Thanks for the solution. It worked! I wrote a comment in line one that reminds me not to delete this line
Please Log in to join the conversation.
Time to create page: 0.049 seconds
