UTF-8 对我有用,无需任何特殊转换,如下所示。是否有可能电子邮件转换为 UTF-8 没有按预期工作?您能否发布一个不适合您的 UTF-8 示例以及您的期望?
以下演示消息适用于我,并提供了 JSON 和屏幕截图。我已添加♠♥♣♦
到每个文本字段以进行验证。
您可以在此处找到示例 Go 代码:
代码:github.com/grokify/go-glip/...
{
"icon": "https://i.imgur.com/9yILi61.png",
"title": "**Title of the post ♠♥♣♦**",
"body": "Body of the post ♠♥♣♦",
"attachments": [
{
"color": "#00ff2a",
"pretext": "Attachment pretext appears before the attachment block ♠♥♣♦",
"author_name": "Author Name ♠♥♣♦",
"author_link": "https://example.com/author_link",
"author_icon": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/fd/000080_Navy_Blue_Square.svg/1200px-000080_Navy_Blue_Square.svg.png",
"title": "Attachment Title ♠♥♣♦",
"title_link": "https://example.com/title_link",
"fields": [
{
"title": "Field 1 ♠♥♣♦",
"value": "A short field ♠♥♣♦",
"short": true
},
{
"title": "Field 2",
"value": "This is [a linked short field](https://example.com)",
"short": true
},
{
"title": "Field 3 ♠♥♣♦",
"value": "A long, full-width field with *formatting* and [a link](https://example.com) \n\n ♠♥♣♦"
}
],
"text": "Attachment text ♠♥♣♦",
"image_url": "https://media3.giphy.com/media/l4FssTixISsPStXRC/giphy.gif",
"thumbnail_url": "https://funkybuddhabrewery.com/sites/default/files/WorldBeerCupGold.png",
"footer": "Attachment footer and timestamp ♠♥♣♦",
"footer_icon": "http://www.iconsdb.com/icons/preview/red/square-ios-app-xxl.png",
"ts": 1517169226
}
]
}
有关消息格式的更多信息,请参见此处:
http://ringcentral-api-docs.readthedocs.io/en/latest/glip_message_attachments/