Jump to content

Browser displaying weird characters instead of £ sign.


DanielHardy

Recommended Posts

I know this is a common problem.

 

I did also have a problem with the browser adding backslashes around apostrophies, but this was solved by editing the magic quotes setting.

 

However I am still having trouble adding the £ symbol.

 

Let me know if you need any code.

 

Thanks

 

 

Where does the £ sign come from? Straight from PHP source code?

If yes, your file's encoding is different from what you specify on in your HTML code.

 

depending on the editor you use, it should be selectable (the file's encododing)

 

Do you have a meta entry to set the charset option?

 

"Simply typed in HTML" how do you mean? Do you use a WYSIWYG editor? If yes, it might have used it's html entity instead of the actual character, to avoid that very problem.

The £ sign is being edited in the browser and saved to a html file (this html file has no html coding, or indeed a charset).

 

The html files contents are then echoed back onto the screen.

 

In short, i think it is using its html entity instead, how do i combat this?

The £ sign is being edited in the browser and saved to a html file (this html file has no html coding, or indeed a charset).

 

The html files contents are then echoed back onto the screen.

 

In short, i think it is using its html entity instead, how do i combat this?

 

htmlentities .. May help.

The £ sign is being edited in the browser and saved to a html file (this html file has no html coding, or indeed a charset).

Wherever you are saving this to, if the final output is HTML then it should be converted to a html entity before saving.

£ should be saved as £

 

You will get issues for instance if you try and save a £ symbol straight into a database table without the correct encoding.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.