BotFramework-WebChat icon indicating copy to clipboard operation
BotFramework-WebChat copied to clipboard

[Bug] Adaptive Cards > Error rendering quote chars in message.text

Open nwhitmont opened this issue 9 years ago • 4 comments

Problem Description Testing newest build of webchat 0.10.8 via unpkg CDN link, there appears to be an error rendering " characters. Works fine in WebChat "Channel" iframe. see attached.

Expected: You can request the current weather forecast for CITY_NAME by typing: “what is the weather in Miami?”

Actual: You can request the current weather forecast for CITY_NAME by typing: âwhat is the weather in Miami?€

direct line webchat vs iframe

nwhitmont avatar Jul 06 '17 18:07 nwhitmont

@reyesrico The code used to trigger this error is:

var defaultReplyHandler = function (session) {
    session.send(`Sorry, I did not understand ${session.message.text}`);
    session.endConversation('You can request the current weather forecast for CITY_NAME by typing: "what is the weather in Miami?"');
};

nwhitmont avatar Jul 11 '17 21:07 nwhitmont

@nwhitmont make sure to set the charset=UTF-8 in the bot server and in the bot client:

  • For the webserver (i.e. IIS, Azure, etc) set the Content-Type: text/html; charset=UTF-8
  • For the client (index.html) set meta charset="UTF-8" tag inside the head tag.

reyesrico avatar Jul 12 '17 00:07 reyesrico

resolved

nwhitmont avatar Jul 17 '17 22:07 nwhitmont

I also faced this issue, then I created the message with below formats in MS bot Code(app.js).

var customMessage = new builder.Message(session)
        .text("I didn't quite get that. For us ......")
        .textFormat("plain")
        .textLocale("en-us");
    session.send(customMessage);

Refer Official URL for V3: https://docs.microsoft.com/en-us/azure/bot-service/nodejs/bot-builder-nodejs-message-create?view=azure-bot-service-3.0

sivanandh avatar Feb 27 '19 08:02 sivanandh