Hi all,
This is a problem I come across every so often; I always end up writing some horrible bodge, but I'm sure there must be a correct way to deal with it (after all, it's surely not uncommon to want to work with UK pound symbols).
The problem: the user enters a UK pound symbol (£) into a textfield in the CMS. They click save, and the form field value is escaped using the JavaScript escape() function and POSTed using AJAX (jQuery). However, at some point the pound symbol becomes a question mark (incorrect character encoding?).
I can't just convert the symbol to it's HTML entity before saving to the database, because when the values are retrieved for display on the front end of the web site they are HTML encoded (so the entity will just appear as is).
To clear this up for me once and for all, what should I be doing here?