Closed lmiol closed 3 months ago
Actually, the supported new line sequence in Mod descriptions is CRLF ( \r\n
or 0D 0A
ASCII sequence) which is the Windows standard, and this is saved as this (with CRLF) in the XML file.
You problem is, I think, that the BATCH ECHO command generate a single LF ('\n', 0A'). You'd better use PowerShell which allow more sophisticated string manipulation.
Actually, the supported new line sequence in Mod descriptions is CRLF (
\r\n
or0D 0A
ASCII sequence) which is the Windows standard, and this is saved as this (with CRLF) in the XML file. You problem is, I think, that the BATCH ECHO command generate a single LF ('\n', 0A'). You'd better use PowerShell which allow more sophisticated string manipulation.
line break character not supported by xml format (doesnt matter ascii or utf8)
it should be <description> some text \r\n new line text </description>
instead of a symbol which any editor show up it like a line break.
i tried
notepad.exe
notepad++.exe
sublime.exe
akelpad.exe
wordpad.exe
i mean if someone to try to generate custom xml by any method he doesn't need to investigate how to support right character of line break to right view in open mod manager
And by the way. ASCII is old Americal standard bounded old programs with only english characters. Even new Sublime Text doesn't support it by default. UTF-8 is usual common in everyday apps Windows 1252 and Windows 1250 is common for Windows
I don't deny that I'm pursuing my goal and it benefits me if you do it this way. But that doesn't negate the fact that it's the right thing to do and that it will be convenient for everyone who wants to create XML descriptions themselves. But I won't insist. I'll figure out how to insert line breaks with CRLF.
Therefore, if you're against it, we can close the issue.
line break character not supported by xml format (doesnt matter ascii or utf8) it should be
<description> some text \r\n new line text </description>
instead of a symbol which any editor do it like a line break. i tried notepad.exe notepad++.exe sublime.exe akelpad.exe wordpad.exe
I understand what you are asking for now. But, you are wrong, the only characters that must be escaped within XML text nodes are <> &
. Furthermore "\r" or "\n" are not valid XML escape sequences... however you could use the 

to insert CRLF sequence as escaped ASCII code, the parser should properly transcode it... try it.
i mean if someone to try to generate xml by any method he doesn't need to investigate how to support right character of line break for open mod manager in his xml
There is no investigation... CRLF is the Windows standard, and this can be put within the XML text node as this, without escaping...
And by the way. ASCII is old Americal standard bounded old programs with only english characters. Even new Sublime Text doesn't it support by default. UTF-8 is common
The parser is UTF-8 standard, it encode and decode UTF-8, to/From Windows UTF-16... CR ( 0D ) and LF ( 0A ) are ASCII basic codes that are shared by UTF-8 and almost all known and used code pages.


single 
is fixed broblem
single

is fixed broblem
0b
is code for vertical tabulation... glad to know it works (I don't know how) however I recommend to use 0d 0a
which is the proper sequence for new line...
I decided to automatically create the package.xml file using a simple solution in BATCH.
after generation it looks like modpack.xml what created from Mod-package editor from OMM buttttttttttttttttttttttttt.... my genereated modpack.xml lools like this in preview
but expected like this (this screen made after created file from Mod-package editor from OMM)
I did investigate and find out My symbol of line break (what created by echo) is not the same as yours.
I tried a lot of variants and I think its not possible to do right line break symbol as yours via BATCH
Could you do recognizing of your symbol of line break kinda \r\n for example?
Also xml doesn't support line breakes inside tag (its only 1 line). so it seems is only one solution to fix this - is to make \r\n support and if someone want to write \r or \n in description - you can save as
\\r \\n
and read as \r \n in preview there is no conflict