Skip to content

Commit

Permalink
Fix data encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
watson committed Dec 23, 2017
1 parent 13c8ff7 commit 094903a
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'))
fs.createReadStream(path.join(__dirname, 'data', 'airlines.csv'), {encoding: 'latin1'})
.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'))
fs.createReadStream(path.join(__dirname, 'data', 'airports.csv'), {encoding: 'latin1'})
.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 094903a

Please sign in to comment.