PDA

View Full Version : phpMyAdmin and charset, language, etc..


pascal
12-07-2006, 03:33 AM
Hello,

I'll try to explain you well my problem.

This mysql server is 4.1.20

When from nodeworx I connect to phpMyadmin I can choose different language. There is in the list fr-iso8859-1. It is what I need, because when I want to export databases I want to have all characters like é, à, è, etc

So I choose fr-iso8859-1

But once connected I have, in the right panel under phpmyadmin, only French-Utf8 and there I can't choose any iso8859-1, there is only utf8 language listed here. I also have MySQL charset: UTF-8 Unicode (utf8) in this left panel.

If I look at the variables in phpmyadmin I have :

Variable Session value Global value
character set client utf8 latin1
character set connection latin1 latin1
character set database latin1 latin1
character set results utf8 latin1
character set server latin1 latin1
character set system utf8 utf8
character sets dir /usr/share/mysql/charsets/ /usr/share/mysql/charsets/


The problem whith this is that whena user do an expport in a file all special characters are not converted well. All é, à,è, etc are not translated.

Why is there some difference between the global value and the session value ?
Why I can't choose fr-iso8859-1 as language one connected to phpmyadmin ?

How I have to set phpmyadmin config file or mysql my.cnf to allow to choose fr-iso8859-1 as language and always have latin1 as default charset ?

Of course on my other server I don't have this problem has mysql server is 4.0.21

Thanks for your help

Pascal

pascal
12-07-2006, 04:00 AM
For example, if I do an export of a table, in a file I have in my file.sql


-- phpMyAdmin SQL Dump
-- version 2.6.2
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Jeudi 07 Décembre 2006 à 10:45
-- Version du serveur: 4.1.20
-- Version de PHP: 4.3.9
--
-- Base de données: `test_test`
--


As you can see all special chars has been replaced by é chars
but if I do this same export but not in file, I can see in the phpmyadmin screen this


-- phpMyAdmin SQL Dump
-- version 2.6.2
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Jeudi 07 Décembre 2006 à 10:48
-- Version du serveur: 4.1.20
-- Version de PHP: 4.3.9
--
-- Base de données: `test_test`
--


In this last case I think it is my navigator charset that is used, so it is ok

I think phpmyadmin 2.6.8 give more options as for example the ability to change the charset for an export ?

Anyway, hoy could I have fr-iso8859-1 set in phpmyadmin and not utf8

Here is what I have when I connect as root in phpmyadmin

phpMyAdmin
Language : Liste with only UTF-8 lang
MySQL charset: UTF-8 Unicode (utf8)
MySQL connection collation: latin_general_ci


Pascal

pascal
12-07-2006, 04:04 AM
finally I found I way to allow the file exported to be in iso8859-1 and not in utf-8

I have changed the config file in /usr/local/interworx/lib/phpMyAdmin/ config.inc.php

$cfg['AllowAnywhereRecoding'] = TRUE; rather than FALSE

This way when you export a database or a table in a file you can choose the charset of this file

But the question of #1 remain.
Why in phpMyAdmin I can't choose fr-iso8859-1 langages but only utf-8 ones ?
Why my charsets values are differents between the global and the session values ?

Thanks a ton for your explanations if some of you have some !!!

Pascal