Skip to content

input conversion reading string (or files?) with windows-style line ends ("\r\n") #215

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

Open
slayoo opened this issue Apr 19, 2018 · 1 comment
Labels
bug Something isn't working c++-only good first issue Good for newcomers

Comments

@slayoo
Copy link
Member

slayoo commented Apr 19, 2018

As reported by @davidh-ssec on SF.net (https://sourceforge.net/p/gnudatalanguage/bugs/651/):

IDL> data2 = fltarr(1,2)
IDL> s2 = '5 ' + string([13B, 10B]) + '5 ' + string([13B, 10B])
IDL> reads,s2,data2
IDL> print,data2
      5.00000
      5.00000
GDL> data2 = fltarr(1,2)
GDL> s2 = '5 ' + string([13B, 10B]) + '5 ' + string([13B, 10B])
GDL> reads,s2,data2
% Input conversion error.
GDL> print,data2
      5.00000
     -1.00000
@slayoo slayoo added the bug Something isn't working label Apr 19, 2018
@GillesDuvert GillesDuvert changed the title input conversion error for lines ending with space carriage return input conversion reading string (or files?) with windows-style line ends ("\r\n") May 4, 2018
@GillesDuvert
Copy link
Contributor

title changed. conversion is OK if lines end with \n only. We should in this case ignore \r (rather, more generally, a predefined set of line ending characters).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working c++-only good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants