Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

653
Vistas
Dialogflow CX Messenger renderCustomText() and renderCustomCard() functions not rendering text correctly

I am using Dialogflow CX Messenger integration for one of my bots. I'm trying to use these functions. They work well until I use certain special characters such as accented characters. This happens commonly as one of the languages of my bot is spanish.

For example: "This is displayed correctly, until I use spanish characters such as ¿ Á é ñ . Emoji break it too: 🤔"

ends up being displayed as This is displayed correctly, until I use spanish characters such as ¿ à é ñ . Emoji break it too: 🤔

Example of what the output looks like in the messenger itself

This doesn't happen when the message itself comes from Dialogflow, it works fine when a response comes from there. Even emojis work. The issue only appears when I try to use these functions.

My code uses the embed code provided by the Dialogflow CX console, and I added a script that looks like this

window.addEventListener('dfMessengerLoaded', function (event) {
    const exampleText = "This is displayed correctly, until I use spanish characters such as ¿ Á é ñ . Emoji break it too: 🤔";
    dfMessenger = document.querySelector('df-messenger');
    dfMessenger.renderCustomText(exampleText);
});

I have tried using the renderCustomCard() function and ran into the same issue.

Any help is very appreciated! Thanks

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I ended up figuring it out, the problem wasn't with the function themselves.

It's just that I was lacking an UTF-8 reference: <meta charset="UTF-8" /> in my HTML. Once this was added in everything worked correctly.

What I found weird is how text sent from Dialogflow itself renders correctly without the need for this tag, which is why I misdiagnosed the problem.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda