Skip to content

Commit

Permalink
The csv files doesn't seem to be ISO-8859-1 encoded anyway
Browse files Browse the repository at this point in the history
  • Loading branch information
watson committed Dec 24, 2017
1 parent eccbe2e commit 1dba747
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function startServer () {
let first = true
res.setHeader('Content-Type', 'application/json')

fs.createReadStream(path.join(__dirname, 'data', 'airlines.csv'), {encoding: 'latin1'})
fs.createReadStream(path.join(__dirname, 'data', 'airlines.csv'))
.pipe(csv(['id', 'name', 'alias', 'IATA', 'ICAO', 'callsign', 'country', 'active']))
.on('error', function (err) {
console.error(err.stack)
Expand Down Expand Up @@ -165,7 +165,7 @@ function startServer () {
let first = true
res.setHeader('Content-Type', 'application/json')

fs.createReadStream(path.join(__dirname, 'data', 'airports.csv'), {encoding: 'latin1'})
fs.createReadStream(path.join(__dirname, 'data', 'airports.csv'))
.pipe(csv(['id', 'name', 'city', 'country', 'IATA', 'ICAO', 'lat', 'lng', 'altitude', 'utcOffset', 'DST', 'tz', 'type', 'source']))
.on('error', function (err) {
console.error(err.stack)
Expand Down

0 comments on commit 1dba747

Please sign in to comment.