PHP pound sign not rendering correctly

07th Jan, 2010 | joomla php web

You know how it is, your web page should have pound signs before those quantities of money but instead it's using some alien hieroglyphic.

This was tracked down to the htmlentities php command, the very command to ensure this doesn't happen!

It actually needs a few arguments to indicate the page encoding. So the following did the trick:

htmlentities($this->describe(), ENT_COMPAT, 'UTF-8');