0

I have a Wordpress site and I am having issues displaying the uppercase O with the accent as seen below:

Ó

The lowercase o with accent as seen here

ó 

displays fine along with a number of other characters. The charset in the header is set to UTF8 and the DB column for each field is set to UTF8_general_ci.

Is there something special about the capital Ó?

When I print_r straight from the DB without sending to the browser, it prints out correctly, and it is stored in the table correctly as well.

It's just once it loads into the field the html that it displays incorrectly.

CRAIG
  • 977
  • 2
  • 11
  • 25
  • Probably an encoding mismatch. Put those strings through `bin2hex()` and post the results. Directly from the DB, don't copy/paste. – Sammitch Mar 18 '20 at 22:52
  • Just a heads up to @RiggsFolly. That post did not answer my question. The answer was to use htmlentities($string, ENT_COMPAT, 'UTF-8'). This wasn't mentioned at all in the "answer" you pointed to after closing my question. – CRAIG Mar 19 '20 at 20:02
  • And where was the [Minimal, Complete and Verifiable Example](http://stackoverflow.com/help/mcve) that showed us you were doing anything like that?? The question needed closing for a number of reasons, the one I used was I thought had the most potential to be useful – RiggsFolly Mar 19 '20 at 23:59
  • to improve your experience on SO please read [how to ask](https://stackoverflow.com/help/how-to-ask), an [On Topic question](https://stackoverflow.com/help/on-topic), then look at the [Question Check list](https://meta.stackoverflow.com/questions/260648/stack-overflow-question-checklist), [the perfect question](http://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/) – RiggsFolly Mar 19 '20 at 23:59
  • Based on your how to ask article, I Wrote a title that summarized the problem quite well I think, I gave an intro before posting any code (there isn't any code to post in this case. I suppose I could have put a variable: $string. Not sure how that would have helped. I explained in detail everything I had already attempted, because quite frankly, I had already done quite a bit of research. In this case, is isn't possible to have others reproduce it because, based on the "answer" you referred to, there are many possible options. Oh, I also chose applicable tags PHP and Character encoding. – CRAIG Mar 20 '20 at 00:06
  • It would have been more helpful for you to point to that question and asked, "Do any of these resolve your problem." That actually would have been a helpful resolution rather than making an assumption and shutting it down. – CRAIG Mar 20 '20 at 00:07

0 Answers0