Cuberite Forum
Remove ^M newline type from non-windows platform - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Discussion (https://forum.cuberite.org/forum-5.html)
+--- Thread: Remove ^M newline type from non-windows platform (/thread-1233.html)



Remove ^M newline type from non-windows platform - xreprimand - 08-25-2013

When i am trying to edit *.ini files (also, why developer choose ini extension?) I see ^M character at the end of each line. I think it should be bug or something like that.
Proof screenshot: http://u.to/RsxOBA


RE: Remove ^M newline type from non-windows platform - xoft - 08-25-2013

It's not a bug, it has been more or less on purpose. The INI file code was adapted from some kind of library. It purposely adds the ^M character on non-windows platforms so that the same INI file can be read by both platforms. True that this is a questionable practice nowadays, since transferring files from one platform to the other usually handles CRLF conversions as well, so I understand your report and am not against fixing this. However, I'm probably not gonna fix this myself; feel free to contribute that fix to IniFile.cpp Smile


RE: Remove ^M newline type from non-windows platform - xreprimand - 08-26-2013

Ok, i will check this file later...
Anyway, *.conf or *.txt looks better for config files =)

<Added later>

I found a bug in webadmin, try to change "Show version" - it does nothing, also it cant read PrimaryServerVersion value


RE: Remove ^M newline type from non-windows platform - xoft - 08-26-2013

The files are called *.ini because that's the format's name, and on Windows such files are editable by Notepad by default, so new users don't have trouble editting the configuration.


RE: Remove ^M newline type from non-windows platform - xreprimand - 08-26-2013

(08-26-2013, 01:09 AM)xoft Wrote: The files are called *.ini because that's the format's name, and on Windows such files are editable by Notepad by default, so new users don't have trouble editting the configuration.
Are you serious?)
If man know what is "config file" and understand "parametr=value" he should use correct program to do it.
By default, windows users use webadmin or other "leftclick" interfaces. Ok, lets make them happy =)


RE: Remove ^M newline type from non-windows platform - NiLSPACE - 08-26-2013

The vanilla server.properties almost looks the same. 'enable-command-block=true'. To be honest I think the settings.ini in MCServer is better since it is organised(Plugin stuff in [Plugin]) etc.