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

UTF-8 is always set #159

Closed
Outworldz opened this issue Nov 5, 2017 · 3 comments
Closed

UTF-8 is always set #159

Outworldz opened this issue Nov 5, 2017 · 3 comments
Assignees

Comments

@Outworldz
Copy link

Earlier versions, such as 2.5.2 saved the INI files as ASCII. Later versions save them as UTF-8. Mysql will not run if My.Ini is UTF-8. fml, I rolled back and it works

@rickyah
Copy link
Owner

rickyah commented Nov 6, 2017

You can set up the encoding when persisting the Ini data to a file. If you are using FileIniStream, you can use the method WriteFile(string filePath, IniData parsedData, Encoding fileEncoding = null) calling it like
iniFileStream.WriteFile("./my.ini", myData, Encoding.ASCII)

https://github.com/rickyah/ini-parser/blob/development/src/IniFileParser/FileIniParser.cs#L121

If this didn't solve the problem, comment there again and I'll reopen the issue 😃

@rickyah rickyah self-assigned this Nov 6, 2017
@rickyah rickyah closed this as completed Nov 6, 2017
@Outworldz
Copy link
Author

Outworldz commented Nov 6, 2017 via email

@Svetomech
Copy link

@Outworldz If you are interested when the change was made: #147

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

3 participants