diff --git a/go/src/input/record_reader_csvlite.go b/go/src/input/record_reader_csvlite.go index 619e4c850..c8cfd55a3 100644 --- a/go/src/input/record_reader_csvlite.go +++ b/go/src/input/record_reader_csvlite.go @@ -146,6 +146,9 @@ func (this *RecordReaderCSVLite) processHandleExplicitCSVHeader( // This is how to do a chomp: line = strings.TrimRight(line, this.irs) + // xxx temp pending autodetect, and pending more windows-port work + line = strings.TrimRight(line, "\r\n") + if line == "" { // Reset to new schema headerStrings = nil @@ -237,6 +240,9 @@ func (this *RecordReaderCSVLite) processHandleImplicitCSVHeader( // This is how to do a chomp: line = strings.TrimRight(line, this.irs) + // xxx temp pending autodetect, and pending more windows-port work + line = strings.TrimRight(line, "\r\n") + if line == "" { // Reset to new schema headerStrings = nil diff --git a/go/src/input/record_reader_dkvp.go b/go/src/input/record_reader_dkvp.go index 97e6b9315..330eba2be 100644 --- a/go/src/input/record_reader_dkvp.go +++ b/go/src/input/record_reader_dkvp.go @@ -71,6 +71,10 @@ func (this *RecordReaderDKVP) processHandle( } else { // This is how to do a chomp: line = strings.TrimRight(line, "\n") + + // xxx temp pending autodetect, and pending more windows-port work + line = strings.TrimRight(line, "\r\n") + record := recordFromDKVPLine(&line, &this.ifs, &this.ips) context.UpdateForInputRecord() inputChannel <- types.NewRecordAndContext( diff --git a/go/src/input/record_reader_nidx.go b/go/src/input/record_reader_nidx.go index 78f61d3fe..91b7d9e7d 100644 --- a/go/src/input/record_reader_nidx.go +++ b/go/src/input/record_reader_nidx.go @@ -72,6 +72,10 @@ func (this *RecordReaderNIDX) processHandle( } else { // This is how to do a chomp: line = strings.TrimRight(line, "\n") + + // xxx temp pending autodetect, and pending more windows-port work + line = strings.TrimRight(line, "\r\n") + record := recordFromNIDXLine(&line, &this.ifs) context.UpdateForInputRecord() diff --git a/go/src/input/record_reader_xtab.go b/go/src/input/record_reader_xtab.go index 9c032f3a3..f7d6e5273 100644 --- a/go/src/input/record_reader_xtab.go +++ b/go/src/input/record_reader_xtab.go @@ -101,6 +101,9 @@ func (this *RecordReaderXTAB) processHandle( // This is how to do a chomp: line = strings.TrimRight(line, this.irs) + // xxx temp pending autodetect, and pending more windows-port work + line = strings.TrimRight(line, "\r\n") + if line == "" { if linesForRecord.Len() > 0 { record, err := this.recordFromXTABLines(linesForRecord)