This is a problem that I encounter every so often; I always end up writing some kind of terrible site, but I'm sure there must be a proper way to deal with it (in the end, of course, it is not uncommon to want to work with British pound characters).
Problem: user enters UK pound symbol ( Β£) in a text box in CMS. They click save, and the form field value is escaped using the JavaScript function escape()and sent using the jQuery AJAX request POST. However, at some point, the pound symbol becomes a question mark (incorrect character encoding?).
I canβt just convert the character to its HTML object before saving it to the database, because when the values ββare retrieved for display on the front side of the website, they are encoded in HTML format (so the object will just display as).
To solve this for me once and for all, what should I do here?
source
share