如何在我的API上获得UTF-8支持?
目前,一个字符串输出如下:
name: "John D�m"
代替:
name: "John Döm"
结帐app.js如下:
var express = require('express'),driver = require('./driver'); var app = express(); app.configure(function () { app.use(express.logger('dev')); app.use(express.bodyParser()); }); app.get('/drivers',driver.findAll); app.listen(3000); console.log('Up: http://127.0.0.1:3000/');