Server rentals :: NFOservers.com

Forums

All times are UTC - 8 hours



Author Message
PostPosted: Tue Feb 07, 2012 4:53 am 
Offline
New to forums
New to forums

Joined: Tue Jan 31, 2012 10:06 am
Posts: 5
Hi,

My database is latin bin ci, my charset of our page is ISO-8859-1 but the chars with accent show such as Sugestões where must appear Sugestões.

We're trying to move host, in our actual host we haven't this problem.

Kind regards,
Marshall


Top
 Profile  
 
PostPosted: Tue Feb 07, 2012 9:53 am 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9222
Location: Seattle
When you import your database, make sure that the character set of the new database matches the old one, and that should prevent this sort of problem. You should be able to change the character set through phpMyAdmin.


Top
 Profile  
 
PostPosted: Tue Feb 07, 2012 10:27 am 
Offline
New to forums
New to forums

Joined: Tue Jan 31, 2012 10:06 am
Posts: 5
First of all, thanks a lot for reply,

I already did this, but my problem persists.

Kind regards,
Marshall


Top
 Profile  
 
PostPosted: Tue Feb 07, 2012 10:54 am 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9222
Location: Seattle
Did you change it after you imported, or before you imported? The character set for the database will need to be set before you populate it with tables -- before you import -- as it determines what each table will use by default.

You will also need to make sure that your application is setting the character set that it wishes to communicate in when it establishes its MySQL connections.

If you don't choose one specifically, a default character set of utf8 will be used. Some hosts use latin1, and it's likely that your exported tables are saved in that format. utf8 is a more universal set and has become the internet standard, making it a better starting point, but you need to continue using whatever you have already been using for the characters to show correctly.


Top
 Profile  
 
PostPosted: Tue Feb 07, 2012 11:16 am 
Offline
New to forums
New to forums

Joined: Tue Jan 31, 2012 10:06 am
Posts: 5
I set the collate before run the dump file.

My app is using the same old in my actual host, Today my host stay in Brazil so I guess the php.ini and another stuffs are set to latin.

Where can I change the charset in my app?

I'm php noob.

Thx


Top
 Profile  
 
PostPosted: Tue Feb 07, 2012 11:41 am 
Offline
Founder
Founder
User avatar

Joined: Thu Apr 18, 2002 11:04 pm
Posts: 9222
Location: Seattle
When I say that you need to set the character set on the database, I mean with an SQL command like this:

ALTER DATABASE your_database CHARACTER SET latin1 COLLATE latin1_swedish_ci;

(replacing this with the appropriate character set and collation for your existing data)

.. if it gives you an error when executing this because of permissions, let us know in a support request, and I can try doing it for you.

I don't know where you would set the character set in your specific app (every one is different), so this is something that you would have to try to find by looking in its configuration files and/or documentation. If it's a well-written application, changing the setting will cause it to perform the command "SET NAMES ..." first whenever it connects to the MySQL server.

It is possible that you might also need to use a different workaround that I'm not familiar with. Character sets and collations and converting between them is a rather complicated subject. A Googling turns up many others who have had similar problems to yours, and the general consensus seems to be that switching to udf8 throughout is the best plan in the long run -- but that can be a rather involved process, which is why I was suggesting the workaround of continuing to use your existing set. Before you continue, it would be worth checking out some of the articles out there on character set problems.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
It is currently Sun May 19, 2013 9:45 am
Powered by phpBB® Forum Software © phpBB Group