Forums / Install & configuration / Problem with accents on new server

Problem with accents on new server

Author Message

Sébastien Antoniotti

Thursday 25 January 2007 12:45:08 am

Hi,

I have moved my ezpublish site (3.8.6) on a new server, and I get problem with accents :

http://img208.imageshack.us/img208/5122/sanstitre29lk.jpg

So I need some help...

Thanks in advance !

eZ Publish Freelance
web : http://www.webaxis.fr

Kristof Coomans

Thursday 25 January 2007 12:49:31 am

Probably a problem with the charset configuration. Check the charset of the db tables and your eZ publish config on the old server and the new one. They should match.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Sébastien Antoniotti

Thursday 25 January 2007 1:11:32 am

Thanks, I'm looking how-to check this

eZ Publish Freelance
web : http://www.webaxis.fr

Sébastien Antoniotti

Thursday 25 January 2007 1:13:54 am

DROP TABLE IF EXISTS `ezapprove_items`;
CREATE TABLE `ezapprove_items` (
  `collaboration_id` int(11) NOT NULL default '0',
  `id` int(11) NOT NULL auto_increment,
  `workflow_process_id` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

It means that my tables are exported in utf8 ?

eZ Publish Freelance
web : http://www.webaxis.fr

Sébastien Antoniotti

Thursday 25 January 2007 2:35:34 am

I think the problem is that my old mysql server was a 4.1.20 and the new one a 5.0.30 ...

eZ Publish Freelance
web : http://www.webaxis.fr

Xavier Dutoit

Thursday 25 January 2007 4:52:37 am

I've add a similar problem with 4.0 to 4.1

With a lot of pain and iconv, I could come back to something ok.

Look at the utf8 discussions, there was a code published on the forums to ease the conversion between charsets (I think it was written by Kristof).

X+

http://www.sydesy.com

Sébastien Antoniotti

Thursday 25 January 2007 5:29:58 am

Hi,

I'have solved the problem myself by droping the new database and re-create them with the good charset.

Good dev !

eZ Publish Freelance
web : http://www.webaxis.fr

Jorge estévez

Thursday 03 January 2008 2:23:11 pm

Hello

How do you "recreate" the database. I am having simmilar problems with accented words, the text gets truncated each time it reaches an accented word.

My site was built from zero with uft8 configuration and once online it just wont display the texts as it should....

Please tell me what to do!

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Jorge estévez

Thursday 03 January 2008 2:29:06 pm

Could the mysql server be a problem in this issue?

at the hosting site I have: MySQL version 5.0.45-community-log
at my PC I have MySQL version 4.1.12

If so, please tell me in details what can I do as I am not experienced in Mysql or Database stuff....

thanks

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Piotrek Karaś

Thursday 03 January 2008 4:07:37 pm

The encoding problems are not only database related. When you move a database, you are most likely to dump into a text file, whose encoding can get damaged easily. It's best if you control that at all stages with a good text editor (under no condition MS Notepad...). Also, manage your data using proper encoding (phpmyadmin for example, for data manipulation). Things were very nasty before and after MySQL 4.1, where UTF-8 support was introduced. But many people still forget to check the previous encoding when changing or upgrading server. Actually, I've experienced several administrators who weren't very interested in differences between 4.0/4.1/5.0, and carefree upgraded their servers, thus destroying entire databases... ;) On one occasion I've also installed eZ at a server where 'SET NAMES utf8' statement was automatically called for all MySQL/PHP connections, which meant double declaration (or something like that...). Even though data was properly imported, multiple characters seemed damaged ;)

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Jorge estévez

Friday 04 January 2008 2:39:04 am

I have checked the SQL exported from my site that was uploaded online (with notepad++), all accents are present and it seems it has no problems at all.

At the hosting site I use phpMyAdmin and the character set is utf8_unicode_ci for teh database.

Maybe I have set a wrong character set just from the beggining:

Available are:

"utf8_bin"
"utf8_czech_ci"
"utf8_danish_ci"
"utf8_esperanto_ci"
"utf8_estonian_ci"
"utf8_general_ci"
"utf8_hungarian_ci"
"utf8_icelandic_ci"
"utf8_latvian_ci"
"utf8_lithuanian_ci"
"utf8_persian_ci"
"utf8_polish_ci"
"utf8_roman_ci"
"utf8_romanian_ci"
"utf8_slovak_ci"
"utf8_slovenian_ci"
"utf8_spanish2_ci"
"utf8_spanish_ci"
"utf8_swedish_ci"
"utf8_turkish_ci"
"utf8_unicode_ci"

Should I select another character set?

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com