How do I very simply show a Euro symbol in Google Assistant? Every time that I attempt to I get the symbol in a different encoding. What simple thing am I missing?
actions-on-google SDK version 2.0.1
const { dialogflow } = require('actions-on-google')
const app = dialogflow({ debug: true })
app.intent('euro-intent', (conv) => {
console.log('€')
conv.ask('€')
})
exports.myBot = app
My action is calling a webhook on AWS API Gateway that is connected to a Lambda function using Node.js v 8.10. The CloudWatch logs show
{
"payload": {
"google": {
"expectUserResponse": true,
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": "€"
}
}
]
},
"userStorage": "{\"data\":{}}"
}
},
"outputContexts": [
{
"name": "projects/newagent-9bde7/agent/sessions/1525808242247/contexts/_actions_on_google",
"lifespanCount": 99,
"parameters": {
"data": "{}"
}
}
]
}
However, I get the below in the simulator.
"\\u20ac"
instead of€
and see if it helps – BronchiContent-type: application/json; charset=utf-8
is being returned, if not then return thecontent-type
header with thecharset
in your lambda. Another thing i would try is setting the content handling to convert to text if needed. I have not used it but not sure it would changing anything for you, i.sstatic.net/AMKTB.png – Bronchi