Remember me

£ Signs!

4 weeks 2 days ago #1

  • Phil Smith's Avatar
  • Phil Smith
  • Posts: 14
If I put a £ sign in a label it displays as \u00a3 on the front end. Similarly, a £ sign in a message box becomes the same thing on the database.

I've tried a lot of things but am stuck so please advise.

Thanks.


Phil

4 weeks 1 day ago #2

  • Artem's Avatar
  • Artem
  • Posts: 11342
Hi Phil,

Thank you for your question. On my side everything looks ok. Does your MySQL database supports UTF-8 character?









Regards,
Artem, Balbooa.com

2 weeks 5 days ago #3

  • Phil Smith's Avatar
  • Phil Smith
  • Posts: 14
Good morning Artem

Since your reply, for which many thanks, I’ve been working on the database and talking to the hosts … but still have the problem, I’m afraid.

In a little more detail, if a £ sign is entered into a Text Area of an Input section of a Form, the Administration message is correct but the database shows u00a310. There is no such problem with $ signs but I think that there is with some other signs.

When I want to use the input, the problem can be worked around with json_decode.

I’ve done quite a lot of housekeeping on the database and tried many collations, to no effect. The current one is utf8mb4_unicode_ci with utf8mb4 as the character set. The server collation is the same but the character set is cp1252 West European (latin1) and the people at fasthosts assure me that all is well from their viewpoint.

I do not think that I have any control over the character set used in the Forms but please correct me if I am wrong. Failing that, can I ask you for further advice, please, as I really want to solve the problem rather than rely on a work around which may be incomplete?

Very many thanks.


Phil

2 weeks 5 days ago #4

  • Artem's Avatar
  • Artem
  • Posts: 11342
Phil,

Yes, in the database symbol £ displays as \u00a3. Since the special characters have a specific html entity assigned. We save submissions in the JSON and it's could be a reason.

But what the reason how it looks in the database, if on frontend and submissions (admin area) is diplsays as a symbol £? :)

Regards,
Artem, Balbooa.com

2 weeks 4 days ago #5

  • Phil Smith's Avatar
  • Phil Smith
  • Posts: 14
Artem

The website allows Administrators to use a Form to add text to regular Emails about the organisation of sporting events. The Emails contain information based on members' submissions and the Administrators can type what they like. The process works by extracting the Administrators' input from the database and adding it to the basic Emails, so it’s obviously important that their input is reproduced faithfully, without strange symbols!

From what you’ve said, I gather that Message Areas use a restricted character set, which is what is causing the problem. This is obviously your decision but, if I may say, I do find it a little odd.

Please confirm that there is nothing that I can do to change the character set?

As I’ve mentioned, I've found that passing the information extracted from the database through json_decode provides a work-around but can I ask if that’s what you would do, please, or whether there is a better approach?

Many thanks and best wishes, as always.


Phil
Powered by Kunena Forum