Jacob Singh wrote:

> Anyway, I had the same problem as steve (I think, I've read the entire
> thread).  It was a HASSTLE.  we got a new server after a crash so I
> uploaded my DB dump from the local box onto a fresh mySQL 3.23 and
> Apache 2.  It seemed more or less okay, I didn't test extensively and a
> week later after 10,000 inserts had been made, I realized the accented
> chars were screwed up, and we use about 25 of them (28 to be exact).  So
> I looked in the DB and lo and behold, they were all corrupted and
> replaced with the char combos Steve mentioned.  To be specific it was an
> upper case A with two dots above it followed by another char, usually
> something weird like the Euro or a Cubed exponent.

Well, I *think* I may have located my problem - and I think that Apache, PHP
and MySQL are all in the clear - the problem was MySQLcc.

Here's why I think that. I dumped a table from the live server (as I did
before) and viewed it with Kwrite (which is set to open/save as
iso-8859-1). This showed that the dumped file did indeed contain latin1
characters.

Now, I had been uploading the tables to my local server using the SQL panel
in MySQLcc - just open the dumped file, and go... When the data were viewed
in MySQLcc, the characters rendered correctly and (here's the snag)
according to all the MySQL config files and the server info in MySQLcc,
everything MySQL-related was set to use latin1. BUT...

If I dumped the table from the local server using mysqldump, the accented
chars were now in utf-8 - note, no Apache or PHP involved. This told me it
was a MySQL problem.

So, I took the original dumped file, which I knew to be in latin1 and
uploaded it to the MySQL server from the command line:
        mysql -D database < filename.sql
And lo! It was *still* in latin1 and now works correctly on the web page set
to iso-8859-1.

But, the characters don't render correctly when viewed with MySQLcc - which
I'm now convinced is using utf-8. I can't find any config settings for
MySQLcc relating to encoding, so maybe it's something to do with KDE? I
don't know - thing is, I've solved the problem. I'll just avoid using
MySQLcc for loading tables.

I'll be sticking with latin1 (or maybe iso-8859-15). I'll never produce a
site that uses more than English and French, so messing with unicode is
just too much grief for me...

-- 
@+
Steve

-- 
PHP Internationalization Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to