I’m building a small database for a charity I volunteer with. It will track events in English and French. When I enter characters like an accented e (as in “journée”) it appears in the database as (journée). If I can get it in the database properly the é comes out as a black diamond with a question mark (�).
Can anyone tell me how to prevent this?
Here’s my table:
CREATE TABLE `dtf_events` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name_en` VARCHAR(50) NULL DEFAULT NULL, `name_fr` VARCHAR(50) NULL DEFAULT NULL, `description_en` VARCHAR(256) NULL DEFAULT NULL, `description_fr` VARCHAR(256) NULL DEFAULT NULL, `publish_start` DATE NULL DEFAULT NULL, `publish_end` DATE NULL DEFAULT NULL, `event_date` DATE NULL DEFAULT NULL, `link` VARCHAR(1024) NULL DEFAULT NULL, `category` ENUM('operational','fundraising','news','test') NULL DEFAULT NULL, `comment` TEXT NULL, PRIMARY KEY (`id`) ) COLLATE='utf8_general_ci' ENGINE=InnoDB AUTO_INCREMENT=34 ;
And here’s a sample of the output i get if the proper accented character is in the db. Note that this code generates a partial page that is intended to fit into an iframe in a text widget on a WordPress site that I have very little administrative control over.
28-f�v-2018 - Date Limite pour demande d'application 24-mar-2018 - Jour d'informations pour volontaire 23-sep-2018 - Journ�e d�orientation: b�n�voles et familles 24-oct-2018 - Journee du Vol 2018mer · 31-d�c-1969 - start is past, end is future