Google 日历集成的编码问题

Encoding issues on Google Calendar Integration

我正在 Wordpress 中开发一个插件,用于将事件与我的 Google 日历集成。集成有效,但当我使用特殊字符时,它们无法正确显示。例如,德语中的“ß”变成“Ô。

我尝试在我的代码中添加以下内容,但没有解决。

if ( false === mb_check_encoding($description, 'UTF-8') ) {
    $description = utf8_encode($description);  
}

$description 是我传递给 Google 日历的字符串值。

尝试使用 iconv,例如:

iconv(mb_detect_encoding($description, mb_detect_order(), true), "UTF-8", $description);