-
Notifications
You must be signed in to change notification settings - Fork 987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
native eol style #844
Comments
If one wants to write portable code as much as reasonably possible then one would always explicitly provide a transcoder, since the r6rs spec says that the default transcoder is implementation defined. |
One supposes that the implementation defines it in a reasonable way. native-eol-style=none is not reasonable in any platform. It only half-works on unix by chance. How do I provide my transcoder to call-with-input-file? Having to rewrite my own version of call-with-input-file because the system supplied one is broken is not reasonable. |
You already know how to provide a transcoder that will be used with I don't know what you could possibly mean by portable code except writing to a specification (presumably r6rs, the last complete specification). The behavior clearly conforms to the specification. Just because you don't like the way it works doesn't mean it's broken. It's not like there aren't other reasonable interpretations of what the default behavior should be. I find it reasonable that the default behavior does not silently change a character stream of valid utf-8 encoded characters when they are read from a file on any platform, and that a program that writes characters out to a file produces byte-identical output on all platforms. That's not to say it can't change (although it is a significant backwards incompatibility), but calling it broken and appealing to portability concerns isn't going to get you anywhere. |
I don't need to go anywhere. Only, I wish I had not wasted the time I wasted chasing bugs caused by this perfectly fine and R6RS compliant behavior of Chez, and was trying to spare the pain to others. |
This is fine if one only wants to read nl-style files. But it makes the default transcoder useless on windows as it makes any code using the default transcoder not able to read correctly native files.
And since there are functions like
call-with-input-file
which do not take a transcoder argument, it is impossible to use these functions to read native eol-style files on windows (I know that one can work around this by using Chez specificcurrent-transcoder
parameter, but let's suppose one wants to write portable code as much as reasonably possible.)I'd call this a bug, but maybe there's a rationale for this behavior?
The text was updated successfully, but these errors were encountered: