将 "gzencode()" 的 return 值转换为 UTF-8

Convert return value of "gzencode()" to UTF-8

我需要通过电子邮件发送页面的 gzip 编码 HTML,(不要告诉我发送 HTML 不压缩)。它无法正常工作,因为 gzencode() 没有 return UTF-8 字符。

如何将gzencode() return的字符串转换为UTF-8字符串,并且在解码gzip字符串时仍能形成原始字符串?

我使用 utf8_encode() 将其转换为 utf8 字符串,我将使用 utf8_decode() 或类似的方式将其转换回其原始字符集(我测试过,有效)