money_format() function showing � instead of local

2019-06-08 08:22发布

问题:

Does anyone have any idea why money_format() is showing � instead of pound sign (£).

The function performs fine on my local server, but when I upload it to my remote server if renders incorrectly.

Does anyone know a solution?

回答1:

You need to use £, not £

A full list of characters affected in this way can be found at http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references



回答2:

Related: php remove/identify this symbol �

Quoted from Gumbo

The character � is the REPLACEMENT CHARACTER (U+FFFD). It is used when there was an error within an UTF code:

FFFD � REPLACEMENT CHARACTER

used to replace an incoming character whose value is unknown or unrepresentable in Unicode