Rich Text field is producing weird space character instead of &nbsp; Example from the frontend


Example in dev tools





If I "view-source" on the page





Example from Rich Text Field





Example from Rich Text Field HTML




This is a Rich Text field within a matrix, it's output in the template like this: {{ block.text }}

If I pass the "|raw" filter I get the same.

If you notice, the Rich Text Field has a &nbsp; before the closing &lt;/p&gt;, which isn't output in the markup, instead I get this strange character.

I had a similar thing with hacksaw recently bringing up this character here:
https://github.com/ehousestudio/craft_hacksaw/issues/16

Any ideas on how to resolve this?
I did contact Craft about this near the time this question was posted, they were not sure why it was occuring.

I found that this issue was environment specific, it was specifically happening locally on MAMP4, with 5.6.* using NGINX.

I was unable to find the cause of the issue, but, in the end it was not happening on server environments so I decided to give up.