Is a lone linefeed (0x0A) a violation of the INI format?
Pregunta
Is it a violation if the INI format to have a single linefeed (0x0A) that is not preceded by a carraige return (0x0D)?
Ini4j is puking on this in my Android app.
Please abstain from asking why I'm using INI in an Android app...
Solución
Since *.ini
is a windows format, you can expect, that each newline must be \r\n
.
At least in the sources, only the Registry
class definitivly relies on \r\n
. In all other cases it seems, as if the system property line.separator
is used.
It's still arguable is a cross-plattform library should rely on it...
The problem can be resolved setting setEmptyOption(true)
e.g.
Config c = new Config();
c.setEmptyOption(true);
Ini i = new Ini();
i.setConfig(c);
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow