Jump to content


Photo

htmlentities function


  • Please log in to reply
1 reply to this topic

#1 Heero

Heero
  • Members
  • PipPipPip
  • Advanced Member
  • 50 posts

Posted 03 August 2006 - 05:46 AM

Hi all,

I've noticed when I run the htmlentities function on chinese text it causes it to come out all jumbled out.  Is there a way to avoid this?

Thanks
I'm learning PHP and mySQL. Please forgive my ignorance :(

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 03 August 2006 - 12:38 PM

http://ca.php.net/htmlentities

Like htmlspecialchars(), htmlentities takes an optional third argument charset which defines character set used in conversion. Support for this argument was added in PHP 4.1.0. Presently, the ISO-8859-1 character set is used as the default.


Try using one of the available third argument settings.
Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users