Skip to content

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

Open

Description

@slayoo

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

Activity

  1. 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")[/+] on May 4, 2018
  2. GillesDuvert commented on May 4, 2018

    @GillesDuvert
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions