[sword-devel] I now replace '\n'->'\r' in modules
Chris Little
sword-devel@crosswire.org
Sat, 22 Jun 2002 19:46:49 -0700
Why?
'\n' is newline. '\r' is carriage return. Our practice follows Unix
standard practice, where each ASCII line is ended with a '\n'.
DOS/Windows practice is to end in "\r\n" and Mac practice is to end in
"\n\r". There is really no need for a '\r' to exist in any Sword module
data entry. So an ASCII blank line should be encoded as "\n\n".
More importantly, you mention XML (which is good, because you should
target/expect XML data) where all the whitespace characters you mention
are interchangeable and render as ' ' if at all. Blank lines in ThML
should be encoded as <br /> or <p></p>. In OSIS I suppose it will be
something like <p></p> or <p/>.
--Chris
Victor Porton wrote:
> I found the solution for my last question about newlines:
>
> I will replace '\n'->'\r'. So be aware (especially Windows programmers) that
> my LD editor may create modules having entries with '\r' symbol (I recall that
> ' ', '\n', '\r', '\t' (and only these Unicode symbols) are XML whitespace
> symbols).