Skip to content
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

The problem of creating extra space #219

Open
sami-soft opened this issue Jul 12, 2020 · 3 comments
Open

The problem of creating extra space #219

sami-soft opened this issue Jul 12, 2020 · 3 comments

Comments

@sami-soft
Copy link

There is a problem with saving if the contents of the file we are reading are as follows :

[Identification]
NOM=1234
PRENOM=12

when editing and saving , it puts an empty space in the file before and after equal :

[Identification]
NOM = 1234
PRENOM = 12

How to remove this space? To output the same as the first file?

@Mateo2197
Copy link

Download the source code and include it in your project. Then go to IniFileParser\Model\Configuration\IniParserConfiguration.cs open it in vs and edit AssigmentSpacer = " "; to AssigmentSpacer = "";

@thiagoaxll
Copy link

thiagoaxll commented Dec 23, 2020

You can configure it when loading your .INI file.
var parser = new FileIniDataParser();
IniData configData = parser.ReadFile(path);
configData.Configuration.AssigmentSpacer = "";

@WFDexter
Copy link

WFDexter commented Mar 2, 2022

Glad there's a way around it but it would be nice if the default were for the library to maintain whatever it found in the file. I just lost 2 days to figuring out that I was essentially "corrupting" an INI file that is read by a space-intolerant tool.

Is there any comprehensive documentation of properties and so forth?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants