If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > MySQL Migration from Windows to Linux Character issue..

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-23-09, 09:00
anagaria anagaria is offline
Registered User
 
Join Date: Sep 2009
Posts: 3
Red face MySQL Migration from Windows to Linux Character issue..

Hello Everyone,

I am trying to setup a new infrastructure for Apache/PHP/MYSQL, all currently are Windows Server and I am migrating to CentOS in a load balancer enviroment. Everything works however, I am having an annoying problem which I am fighting for few hours now. When I migrate a database over from the Windows server to the Linux Server I am getting bad characters. I have tried character sets and collation on the database but dint help.

below is an example:

it's (On the old server)

It�s (on the new server)

I have tried mysqldump ----default-character-set=latin1 and then imported the the database but I got the following results.

The solution i tried was from this link http://www.orthogonalthought.com/blo...al-characters/

it?s (it changes an apostrophy tp a question mark?)

I am running out of ideas because I have also tried copying raw files from server tp server and still the same issue.

Does anyyone what is cusing this character change, i know that defaults backups are UTF8 and i tried changing them using the --default-character-set switch.

Do i need to change my character set global parameter?

FYI these are joomla websites, if that makes any difference. Any help is greatly appriciated.

Thanks,

Adel
Reply With Quote
  #2 (permalink)  
Old 09-23-09, 09:59
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,258
sounds like a codepage problem
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old 09-23-09, 10:05
anagaria anagaria is offline
Registered User
 
Join Date: Sep 2009
Posts: 3
I am not sure what codepage means, is this a PHP setting that i can specify?
Reply With Quote
  #4 (permalink)  
Old 09-25-09, 12:19
anagaria anagaria is offline
Registered User
 
Join Date: Sep 2009
Posts: 3
I fixed the issue by doing a regular mysqldump --database dbname > dbname.sql

and then opened the file and changed utf8 to latin1. that fixes the character issue.

Thanks.
Reply With Quote
  #5 (permalink)  
Old 09-25-09, 12:25
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,519
Another option is to use the Unix command dos2unix to remove DOS characters.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On