phpMyAdmin - How to change "MySQL charset: UTF-8 Unico

Problems with the Windows version of XAMPP, questions, comments, and anything related.

phpMyAdmin - How to change "MySQL charset: UTF-8 Unico

Postby prosto » 18. March 2005 21:58

Hi.

I'm having troubles importing data because of this UTF-8 setting.
How can I switch it to a different one?

Thank you.
prosto
 
Posts: 5
Joined: 18. March 2005 21:52

Postby prathapml » 19. March 2005 20:05

I believe you need to edit my.cnf
prathapml
 
Posts: 87
Joined: 11. March 2005 23:03

Postby prosto » 19. March 2005 22:30

my.cnf:
character-set-server = latin1
collation-server = latin1_general_ci

There's also a line there that's commented out:
# default-character-set=utf8
But playing around with it doesn't solve the problem...
prosto
 
Posts: 5
Joined: 18. March 2005 21:52

Postby sckoh » 20. March 2005 23:58

You cannot change the basic charset, utf8 to others. That's a limit condition of Mysql 4.
You can check and see the values at phpmyadmin.
Image
User avatar
sckoh
 
Posts: 67
Joined: 01. March 2005 02:16
Location: Washington DC

Postby prosto » 22. March 2005 23:44

sckoh wrote:You cannot change the basic charset, utf8 to others. That's a limit condition of Mysql 4.

That's not true...

I don't know what's happening but I would like to get a response from XAMPP team on my problem.

Thanx.
prosto
 
Posts: 5
Joined: 18. March 2005 21:52

Postby Wiedmann » 23. March 2005 00:33

I'm having troubles importing data because of this UTF-8 setting.

Can you explain more exactly your described problems?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby prosto » 23. March 2005 01:03

OK.

When I open phpMyAdmin on the right side under "Language" and above "MySQL connection collation" selection it says: "MySQL charset: UTF-8 Unicode (utf8)"

So, this tells me that it's not what I have in my.cnf.
Where do we set this MySQL charset then?

I have dumps of DBs which are in CP1251.
But they are all stored in UTF-8.
And for some reason when I open my test site in the browser everything looks like "????? ?? ??????????" in any encoding.

I dunno where to look at.
If you point me in the right direction I would be very grateful.
prosto
 
Posts: 5
Joined: 18. March 2005 21:52

Postby Wiedmann » 23. March 2005 02:02

Well...

When I open phpMyAdmin on the right side under "Language" and above "MySQL connection collation" selection it says: "MySQL charset: UTF-8 Unicode (utf8)"

This is nothing you can change. This shows you the charset of the OS where MySQL is running on.

So, this tells me that it's not what I have in my.cnf.
Where do we set this MySQL charset then?

The default charset in XAMPP should be "Latin1", with the collation "latin1_general_ci". So it might be a good idea, to change the " MySQL connection collation" in phphMyAdmin to this setting, too.

Every new database/table you create, will have this settings. But you can define a different charset for each db/table within the "CREATE" - statement. If you want to change the default, you can do this in the "my.cnf".

In phpMyAdmin you can see the current settings at "Show MySQL system variables".

have dumps of DBs which are in CP1251.
But they are all stored in UTF-8.

Sorry, no really idea. What is the charset from the db before you import some data? Try to import with a commandline tool ("mysql.exe") and set the correct charset parameter.

Have a look at: http://dev.mysql.com/doc/mysql/en/charset.html

And for some reason when I open my test site in the browser everything looks like "????? ?? ??????????" in any encoding.

Or you have a problem with Apache (too). Hav you defined " AddDefaultCharset foo" in the "httpd.conf"?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby prosto » 23. March 2005 17:27

The default charset in XAMPP should be "Latin1", with the collation "latin1_general_ci". So it might be a good idea, to change the " MySQL connection collation" in phphMyAdmin to this setting, too.

Yes, everything is set to these settings.

Or you have a problem with Apache (too). Hav you defined " AddDefaultCharset foo" in the "httpd.conf"?

Yes, I played with this setting too.


Could it be phpMyAdmin settings problem?

When I create DB with cp1251_general_ci collation and then import dump with character set cp1251, this is the only time when I can later read and edit data in phpMyAdmin with no problems. Browser encoding setting is UTF-8.
But I'm getting ??????? ?? ??? when opening my site in the browser as I described before.

Now, if I create DB with latin1_general_ci collation and import dump with latin1, this is the only time I can finally read my pages.
But in phpMyAdmin all the data is displayed in symbols in any encoding selected in my browser...
And I cannot edit my data.

What can I try with config.inc.php?
My $cfg['DefaultCharset'] = 'iso-8859-1';

I'm totally confused...
prosto
 
Posts: 5
Joined: 18. March 2005 21:52

Postby sckoh » 06. April 2005 03:24

Hi, Gentlemen.
Default charset in Mysql 4.1.10 is utf-8 which is unable to change, as before 4.1.x was latin1 as fixed as well.

All the others can be changable with command
"mysql>set names YOUR CHARSET;" or,
"mysql>set session names YOUR CHARSET;"

And you can see how it has been changed,
"mysql>show variables like 'c%';"

You' can understand that global values are changale except system charactor utf-8 but session values are remain unchanged.

If you know the way to change session values, please let me know.
Image
User avatar
sckoh
 
Posts: 67
Joined: 01. March 2005 02:16
Location: Washington DC

Postby sckoh » 06. April 2005 03:28

prosto wrote:What can I try with config.inc.php?
My $cfg['DefaultCharset'] = 'iso-8859-1';

I'm totally confused...

It is not apache's or phpmyadmin's problem, but mysql 4.1.10's matter.
Until you return to old mysql, you cannot fix the problem.
Image
User avatar
sckoh
 
Posts: 67
Joined: 01. March 2005 02:16
Location: Washington DC


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 131 guests