using express and body-parser with the following setup:
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
app.use(bodyParser.json({limit: '100mb', extended: true,type: 'application/*+json;charset=utf-8'}))
app.use(bodyParser.urlencoded({limit: '100mb', extended: true}));
app.use(bodyParser.text({defaultCharset: 'utf-8'}));
app.use(express.json());
When running the nodejs server using npm start, special characters inside the json body are utf-8 encoded as expected. Once hosted in IIS, the character encoding fails. Only difference is the hosting environment. The .NET Globalization options are set correctly for the IIS site hosting the nodejs server application with 'utf-8' settings, without making any difference. Double-checked web.config. What could possibly be messing up the incoming requests data?
json body request output - when nodejs is hosted in IIS
json body request output - when server is run directly using npm start:
A hint on what may be going on: https://www.i18nqa.com/debug/bug-utf-8-latin1.html
Anyone know where to look?