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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 21:29:25
Script start
Timing: Jan 19 2025 21:29:25
Module start 'layout'
Timing: Jan 19 2025 21:29:25
Module start 'content'
Timing: Jan 19 2025 21:29:26
Module end 'content'
Timing: Jan 19 2025 21:29:26
Script end

Main resources:

Total runtime1.2290 sec
Peak memory usage4,096.0000 KB
Database Queries87

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 589.2813152.6406
Module start 'layout' 0.00480.0026 741.921939.4766
Module start 'content' 0.00741.2201 781.3984758.8047
Module end 'content' 1.22750.0015 1,540.203124.1406
Script end 1.2290  1,564.3438 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2588160.0002
Check MTime0.00130.1061160.0001
Mysql Total
Database connection0.00060.046110.0006
Mysqli_queries1.141392.8616870.0131
Looping result0.00110.0920850.0000
Template Total1.202297.820.6011
Template load0.00180.150020.0009
Template processing1.200397.663120.6002
Template load and register function0.00030.021210.0003
states
state_id_array0.00110.091310.0011
state_identifier_array0.00070.053820.0003
Override
Cache load0.00170.1414740.0000
Sytem overhead
Fetch class attribute can translate value0.00130.108850.0003
Fetch class attribute name0.00130.1034150.0001
XML
Image XML parsing0.00270.219650.0005
class_abstraction
Instantiating content class attribute0.00000.0033190.0000
General
dbfile0.00150.1253350.0000
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
11content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 37
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs