Hi Guile community! First of all, thank you for the wonderful language you created. It's super fun for me to try to get stuff done using Guile.
Now to my problem: I have an XML file like this:
eol-guile.xml
Description: Binary data
In this file there are elements that contain text nodes with CRLF (Windows style EOL) and ones containing LF (UNIX style EOL). I wish to preserve the CRLF line endings. However, the following little script shows that they get lost during reading/parsing:
(use-modules (sxml simple) (srfi srfi-26)) (let ((sxml (call-with-input-file "eol-guile.xml" xml->sxml))) (write sxml) (call-with-output-file "eol-guile-written.xml" (cut sxml->xml sxml <>)))
After reading in the file and parsing it to SXML the CRLF is gone. This seems to happen during the SXML parsing. How do I prevent this from happening? Thanks, Daniel