[plt-scheme] Bug in here strings?
At Wed, 2 Apr 2008 14:42:28 -0700 (PDT), pp wrote:
> Hi there. I think there is an inconsistency in the way here strings
> are evaluated in the REPL versus when loaded from file. This is
> Windows, 372.
>
> Consider the following module:
>
> (module t mzscheme
> (provide test)
>
> (define test #<<!
> test
> !
> ))
>
> when this module is entered in DrScheme and evaluated, we can do this:
>
> > (require t)
> > test
> "test"
>
> Which is what is expected. But if, instead we load the module from
> file we get:
>
> > (require "t.scm")
> > test
> "test\r"
It's really that the program text is read in different modes. When
DrScheme reads a file into the editor, it converts "\r\n" to just "\n".
When `require' reads directly from a file, it performs no such
conversions, so a "\r" is left in the string.
So, that's the explanation, but I don't know what should change to
arrive at a different result.
Matthew