Welcome Guest, Not a member yet? Register   Sign In
Problem retrieving words with accents when they come from MySQL
#9

[eluser]Kobus M[/eluser]
[quote author="caperquy" date="1296836064"]To answer xatrix question this is the text that I pass to the preg_match_all function :

Chaque étape est montrée dans des églises de différents coins de France

the word église I am looking for is really there

On the other hand I did what Kobus said :
I recreated my database using the following command :

Code:
CREATE DATABASE `ci_docavy` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

I also set my HTML code to look like this :

Code:
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<?php
header('Content-type : text/html; charset=utf-8');
?>

Unfortunately there is no change.

CapErquy[/quote]

There are a few final things I can think of for you to try:

1. Check the setting of your character sets in your server configuration files. php.ini, my.cfg, etc. All should also be set to UTF8
2. Even when recreating your database with UTF8, individual fields could still be set to ISO-8859-1 or something else. Make sure all data is in UTF8 format too.

If this does not help, I am sorry - I am out of ideas. Having struggled with this myself, I solved my issues by doing the things I suggested.

Kobus


Messages In This Thread
Problem retrieving words with accents when they come from MySQL - by El Forum - 02-04-2011, 06:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB