我之前程序运行良好用的 mb_convert_encoding($profile, 'HTML-ENTITIES','UTF-8') ,但是升级php8.2报错
Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead in
我换$profile = htmlentities($profile, ENT_QUOTES | ENT_HTML5, 'UTF-8'); 或者$profile = htmlspecialchars($profile, ENT_QUOTES, 'UTF-8');
全都显示乱码,怎么办呢?