Free Web Hosting Forum
Go Back   Free Web Hosting Forum > Website Building > Web Programming
Reload this Page How can I change MySQL Database Character Encodinig ?
Reply

 

Thread Tools Display Modes
(#1 (permalink))
Old
phoecxan's Avatar
Junior Member
phoecxan is on a distinguished road
 
Posts: 4
Join Date: Nov 2008
Location: myanmar
Default How can I change MySQL Database Character Encodinig ? - 11-08-2008, 07:25 AM

Hi

How can I change MySQL Database Character Encodinig ?I want to change the " latin1_general_ci " to " UTF-8 ". Below " figure_1 " .If you know and help for this problem.Can you explain this problem step by step.
Thank for view my post.
Figure_1:

Last edited by phoecxan : 11-08-2008 at 07:39 AM.
Reply With Quote
(#2 (permalink))
Old
Member
marksfish is on a distinguished road
 
Posts: 81
Join Date: Jul 2008
Default 11-10-2008, 05:57 PM

Looking for an answer to this myself. I thought it would be as simple as going to the operations tab and changing the encoding in there. Unfortunately it wasn't that easy
Reply With Quote
(#3 (permalink))
Old
Bad Karma[CORE]'s Avatar
Senior Member
Bad Karma[CORE] is on a distinguished road
 
Posts: 728
Join Date: May 2008
Default 11-10-2008, 06:05 PM

pull a backup, modify the textfile and change every instance of the collation you have to the collation you want. drop all the tables in the database, change the collation of the database itself and then import the modified backup. As simple as that
Reply With Quote
(#4 (permalink))
Old
Member
marksfish is on a distinguished road
 
Posts: 81
Join Date: Jul 2008
Default 11-12-2008, 05:26 PM

A reply I got from another forum:

You can change the collation from phpmyadmin for the tables . About character set , you need to search for your language file within your joomla installation and edit the character set .

For example : Search for "charset=iso-8859-1" and replace with "charset=iso-UTF-8" as given below :


Quote:
Code:
DEFINE('_ISO','charset=iso-8859-1');with

Quote:
Code:
DEFINE('_ISO','charset=UTF-8');and save changes to the file.
Mark
Reply With Quote
(#5 (permalink))
Old
vahur's Avatar
Junior Member
vahur is on a distinguished road
 
Posts: 2
Join Date: Jan 2009
Location: Estonia
Default 01-02-2009, 09:14 PM

Quote:
Originally Posted by Bad Karma[CORE] View Post
pull a backup, modify the textfile and change every instance of the collation you have to the collation you want. drop all the tables in the database, change the collation of the database itself and then import the modified backup. As simple as that
it`s interesting. Thanks to 'Bad Karma[CORE]'

my question is:
i tryng to made my site multilingual and one lang. is russian.
HTML code:
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<meta name="Content-Language" content="Russian">
database:
cp1251_general_ci

on my laptop with apache server works all good, when i want to see this page on web is there only "????".
http://vahur.comze.com/index.php?lk=1&lng=rus

whats wrong?

Last edited by vahur : 01-02-2009 at 09:17 PM.
Reply With Quote
(#6 (permalink))
Old
vahur's Avatar
Junior Member
vahur is on a distinguished road
 
Posts: 2
Join Date: Jan 2009
Location: Estonia
Default 01-03-2009, 02:08 AM

Hi !

I find the answer. After database connection must be writen:

mysql_query("SET NAMES cp1251");
mysql_query("SET CHARACTER SET cp1251");

This is a problem with MySQL 4.1 and higher.

Last edited by vahur : 01-03-2009 at 02:12 AM.
Reply With Quote
Reply


Thread Tools
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

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



Powered by vBulletin® Version 3.6.9
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0
vBulletin Skin developed by: vBStyles.com