Things to do in Cape Town, the Helderberg, and the Cape Winelands

Tag special characters

FPDF: How to use a Degree Symbol in a Generated PDF

I’ve been using the FPDF PDF generator library for years now as the de facto method for my PHP projects to produce PDF reports. However, one minor annoyance is that the generated PDF files often falter when it comes to the… Continue Reading →

PHP: Handle Microsoft Windows Smart Quotes in Your Strings

Microsoft Word likes converting single and double quotes into it’s so-called smart quotes representation, which can be annoying when you are trying to display the string on a device that doesn’t support smart quotes (the curly ones in case you were wondering). The easiest way to clean out these curly smart or fancy quotes is to run a simple search and replace on your string:

PHP: How to Gracefully deal with some Microsoft Windows Special Characters

Although Microsoft Windows smart quotes are the usual culprits for web developers who need to display strings on devices powered by operating systems other than Windows, there are in fact a number of other Windows-only special characters that can potentially rear their heads every now and then.

© 2021 An Exploring South African — Powered by WordPress