<Surf & Perf/>

  • About
  • Archive
  • Contact
  • 🔎

[PHP] Special characters being replaced with black diamonds with question mark �

If you ever come across this issue where special characters like aprostrophe’s and ñ’s are being replaced by this weird symbol, �, it could be a char-set thing.

I tried a couple of solutions but none of them worked, until I looked into my php.ini for anything related to setting the character encoding, and I found that default_charset is set to UTF-8.

I simply changed it to ISO-8859-1, restarted the IIS server, and refreshed the page.

And it worked!

Php.ini can be found on your PHP installation folder, in my case: 

C:\Program Files (x86)\PHP\php-7.4.8\php.ini

Set default_charset to ISO-8859-1 and enable it by removing the ; in frontdefault_charset = “iso-8859-1”

August 4, 2020
IIS Web Server, PHP, PHP 7
Uncategorized
←Previous: [SQL Server] How to export table data as insert statements
Next: How to add programs on Windows Startup→

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Other topics

Active Directory Ajax Truclient Automation Blogger CSS Eggplant Functional Error How to HTML IE IIS Web Server Javascript Macro PHP PHP 7 Powershell QTP Regex RPA Server Management SQL SQL Server Tutorial UFT UIPath VB VB.net VBA VB Script Video Visual Basic Vugen Vugen 11.52 Web Design Windows Windows Server

Search

(c) 2023