1.6.1 [MSYQL] iso8859 instead of utf8

Problems with the Linux version of XAMPP, questions, comments, and anything related.

1.6.1 [MSYQL] iso8859 instead of utf8

Postby christophe » 08. May 2007 11:53

Hi.

I'm using both xampp for windows (works fine) and lampp for linux

I'he made a form which I use to insert informations in a database :
I started it under windows (at work), I saved htdocs and I exported
my database to work at home under linux.

a script is called by my form, among the statements I have :

$Libelle = iconv("ISO-8859-1","UTF-8",$_POST['Libelle']);
$Resume = iconv("ISO-8859-1","UTF-8",$_POST['Resume']);

once the record has been inserted in the database I have another
script that shows me the full content for my table, all is encoded using
utf8.

If I insert data under linux (I have done it using the form and also
phpmyadmin) I have a mess as former records are utf8 encoded
but all records inserted under linux are iso8859-1 encoded

phpinfo() gives me ;

===========================

character set client utf8
(Valeur globale) latin1
character set connection utf8
(Valeur globale) latin1
character set database latin1
character set filesystem binary
character set results utf8
(Valeur globale) latin1
character set server latin1
character set system utf8

character sets dir /opt/lampp/share/mysql/charsets/
collation connection utf8_unicode_ci
(Valeur globale) latin1_swedish_ci
collation database latin1_swedish_ci
collation server latin1_swedish_ci
===========================

what should I do in order to have mysql dealing with utf8 ?

TIA
christophe
 
Posts: 8
Joined: 08. May 2007 11:23

Re: 1.6.1 [MSYQL] iso8859 instead of utf8

Postby christophe » 09. May 2007 10:30

christophe wrote:
a script is called by my form, among the statements I have :

$Libelle = iconv("ISO-8859-1","UTF-8",$_POST['Libelle']);
$Resume = iconv("ISO-8859-1","UTF-8",$_POST['Resume']);



The first time I did use it, it seemed to be helpful, I don't explain why.

As I encountered the same problem out of xampp, I removed the call to the iconv function : it does work fine.
christophe
 
Posts: 8
Joined: 08. May 2007 11:23


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 9 guests