For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > September 2005 > Problem with accent Import to MySQL/Linux from MySQL Windows









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Problem with accent Import to MySQL/Linux from MySQL Windows
Daedalus.OS

2005-09-04, 3:55 am

Hi,

I've been asked to transfert a database from a webhoster to another. I think
the database is on a windows box but I'm not 100% shure. The webhoster says
it provides combined hosting on NT/Linux Servers.
After exporting the database with phpMyAdmin I tried to import it to a Linux
server with the mysql>source file.sql command via a ssh access (the file is
40 Mbytes so phpMyAdmin is useless). Everything seemed ok but all accented
characters (à é î ...) and some other special characters were replaced by
"?". I search the net and find somewhere that file from windows might need
to be convert to utf8 before importing them so I tried to convert the file
with iconv then re-import the file. Once again everything seemed to work
fine. The accent problem was solve but another one showed-up. The database
stores some html code where accent and special characters are represented in
their html form like this è or č for "è", now all these have
been replaced by other characters like ©Ã instead of é. When I import
the files(not in utf8) to a windows machine with mysql>source file.sql
command, everything is normal.

Any ideas how to solve this ?

Thanks,
Dae


Daedalus.OS

2005-09-05, 7:10 pm

Problem Solved...




"Daedalus.OS" <arsenault.daniel@videotron.ca> wrote in message
news:NZvSe.61765$sY6.1271508@weber.videotron.net...
> Hi,
>
> I've been asked to transfert a database from a webhoster to another. I
> think the database is on a windows box but I'm not 100% shure. The
> webhoster says it provides combined hosting on NT/Linux Servers.
> After exporting the database with phpMyAdmin I tried to import it to a
> Linux server with the mysql>source file.sql command via a ssh access (the
> file is 40 Mbytes so phpMyAdmin is useless). Everything seemed ok but all
> accented characters (à é î ...) and some other special characters were
> replaced by "?". I search the net and find somewhere that file from
> windows might need to be convert to utf8 before importing them so I tried
> to convert the file with iconv then re-import the file. Once again
> everything seemed to work fine. The accent problem was solve but another
> one showed-up. The database stores some html code where accent and special
> characters are represented in their html form like this è or č
> for "è", now all these have been replaced by other characters like ©Ã
> instead of é. When I import the files(not in utf8) to a windows
> machine with mysql>source file.sql command, everything is normal.
>
> Any ideas how to solve this ?
>
> Thanks,
> Dae
>



David Quinton

2005-09-06, 3:56 am

On Mon, 5 Sep 2005 18:01:26 -0400, "Daedalus.OS"
<arsenault.daniel@videotron.ca> wrote:

>Problem Solved...
>


Please tell us - for the archives...
--
Locate your Mobile phone: <http://www.bizorg.co.uk/news.html>
Great gifts: <http://www.ThisBritain.com/ASOS_popup.html>
Daedalus.OS

2005-09-06, 6:57 pm


"David Quinton" <usenet_2005D_email@REMOVETHISBITbizorg.co.uk> wrote in
message news:medqh15sqnc3e337sfjjaku3o88cdm4at5@
4ax.com...
> On Mon, 5 Sep 2005 18:01:26 -0400, "Daedalus.OS"
> <arsenault.daniel@videotron.ca> wrote:
>
>
> Please tell us - for the archives...


Finally it wasn't MySQL but apache. After some verification I noticed that
internally the database was perfect. apache was set with DefaultCharset
utf-8. we changed it to iso8859-1 and the problem was solved.

> Locate your Mobile phone: <http://www.bizorg.co.uk/news.html>
> Great gifts: <http://www.ThisBritain.com/ASOS_popup.html>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com