我正在尝试使用ews api恢复icalender事件。但是,当我在正文字段中使用Unicode字符时,还原后用户帐户中的字符就会更改。
我尝试使用encode('utf'),但仍然遇到相同的问题
我的示例代码如下-
self.event = icalendar.Event()
if data['body']['content_type']:
content_type = data['body']['content_type'].lower()
if(content_type == 'text'):
self.event.add('description', data['body']['content'])
elif(content_type == 'html'):
self.event.add('X-ALT-DESC;FMTTYPE=text/html', data['body']['content'])
https://outlook.office365.com/EWS/Exchange.asmx
因此,Outlook日历事件已成功恢复,没有任何问题,但是当事件正文中包含Unicode字符时,则恢复时会对其进行更改