@字符未显示在Watson对话服务响应字符串中 [英] @ character is not displayed in Watson Conversation Service response string
本文介绍了@字符未显示在Watson对话服务响应字符串中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试使用'
和来转义它,但没有太大帮助。
如何在响应字符串中打印电子邮件地址?
推荐答案
如果电子邮件地址作为上下文变量传递到Watson会话服务,则可以将其作为响应字符串的一部分返回(打印)。假设变量名为"email",其值为"henrik@example.com",则响应如下:
Hello, your mail address is <? $email ?>
它将返回:
Hello, your mail address is henrik@example.com
但是,如果要打印出特殊字符(如@
),则需要小心。The reason is that it refers to entities. It is a shorthand。在这种情况下,您需要用
转义该符号,例如@
。以下是硬编码的响应:
Please contact support at support@example.com
这篇关于@字符未显示在Watson对话服务响应字符串中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文