简体   繁体   中英

how to convert quote from utf8 to iso in php?

I want to convert some text from utf-8 to iso-8859-1 (in PHP) so I do this:

$message_iso = utf8_decode($message_utf8);

It works pretty well for é or ô but not for the simple quote ' which is replace by a ? . How can I make it work? Thanks

也许使用iconv

$message_iso = iconv("UTF-8", "ISO-8859-1", $message_utf8);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM