some utf-8 characters not displayed correctly after db import

General questions regarding the use of languages and encoding issues in Joomla! 1.0.x. Multi-lingual site solutions can be discussed in the child board. Translation discussions are now separate and can be found in the Working Groups Area.

Moderator: General Support Moderators

Locked
User avatar
nixonie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 100
Joined: Fri Jan 26, 2007 2:48 pm
Location: Sk, Macedonia

some utf-8 characters not displayed correctly after db import

Post by nixonie » Sun Jun 17, 2007 2:18 am

everything was OK originally with the site but some utf-8 characters are not displayed correctly after complete db import (MySQL - 4.1.11, joomla 1.0.12) which i had to do from the backup because db was deleted due to a human error (unfortunately, it happend :( )
    * language is macedonian
    * browser selects utf-8
    * problematic characters are in content
    * in page source: content="text/html; charset=utf-8"
    * in the language file - utf-8 is defined for '_ISO'
i used phpmyadmin for dump and import, collation is utf8_general_ci, dump is also utf8 without BOM characters (checked in notepad++), there is a CHARSET=utf8 for every table in database dump

some of the characters (only 3 specific characters to be concrete) are displayed as ??

can anyone please help, i really have no other idea, tried everything i could think of.  :(
Last edited by nixonie on Sun Jun 17, 2007 2:32 am, edited 1 time in total.
***** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed *****_
Live long and prosper,
nn.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: some utf-8 characters not displayed correctly after db import

Post by infograf768 » Sun Jun 17, 2007 5:11 am

Do these characters display OK when you look at these contents in PHPMyAdmin?
Could you post an url?
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
nixonie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 100
Joined: Fri Jan 26, 2007 2:48 pm
Location: Sk, Macedonia

Re: some utf-8 characters not displayed correctly after db import

Post by nixonie » Sun Jun 17, 2007 5:50 pm

Hi, thanks for responding, none of the characters display correctly when i view the database contents via phpmyadmin
at the moment the site i have the problem with is offline.
Last edited by nixonie on Mon Jun 18, 2007 11:12 am, edited 1 time in total.
***** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed *****_
Live long and prosper,
nn.

User avatar
Kampp
Joomla! Guru
Joomla! Guru
Posts: 564
Joined: Tue Aug 30, 2005 9:18 am
Location: Denmark
Contact:

Re: some utf-8 characters not displayed correctly after db import

Post by Kampp » Wed Jun 20, 2007 10:22 pm

I have a similar problem. When I look at my export and import in PhpMyAdmin is displays correctly, but when viewing the site it replaces å, æ, ø with squares or nothing.
I have build well over 20 Joomla sites and this is the first time it has happend. Also I have used the same webhotel for several projects. I even tried another webhotel with the same result.

What could be wrong?
https://toolmaster.dk - Danish Joomla Services
https://joomla-hosting.dk - Danish Joomla hosting
https://joomla-konsulent.dk - Danish Joomla Services

User avatar
092098jvm
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 230
Joined: Wed Aug 09, 2006 5:59 pm
Contact:

Re: some utf-8 characters not displayed correctly after db import

Post by 092098jvm » Wed Jun 20, 2007 10:49 pm

I had the same problem with quotes and copyright symbols. For some reason PHPMyAdmin doesn't import symbols properly. They were fine in the original database and in the sql file. I ended up using JoomlaPack to back up the entire site and restore it to another folder and database - worked like a charm!

http://extensions.joomla.org/component/ ... Itemid,35/

User avatar
Kampp
Joomla! Guru
Joomla! Guru
Posts: 564
Joined: Tue Aug 30, 2005 9:18 am
Location: Denmark
Contact:

Re: some utf-8 characters not displayed correctly after db import

Post by Kampp » Wed Jun 20, 2007 10:52 pm

It has to be another problem, why would this only happen now after so many many Joomla sites build?
https://toolmaster.dk - Danish Joomla Services
https://joomla-hosting.dk - Danish Joomla hosting
https://joomla-konsulent.dk - Danish Joomla Services

User avatar
092098jvm
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 230
Joined: Wed Aug 09, 2006 5:59 pm
Contact:

Re: some utf-8 characters not displayed correctly after db import

Post by 092098jvm » Wed Jun 20, 2007 11:21 pm

Got me. From various forum threads I get the sense that not a lot of people are cloning their sites. Maybe it doesn't show up if you restore to the same database? I haven't needed to do that yet.

User avatar
Kampp
Joomla! Guru
Joomla! Guru
Posts: 564
Joined: Tue Aug 30, 2005 9:18 am
Location: Denmark
Contact:

Re: some utf-8 characters not displayed correctly after db import

Post by Kampp » Wed Jun 20, 2007 11:27 pm

What I do is basically create an export in one phpmyadmin and import ind the other one. Is has worked through out 3 years now on so many sites. I just don't see what could have changed...  :'(
https://toolmaster.dk - Danish Joomla Services
https://joomla-hosting.dk - Danish Joomla hosting
https://joomla-konsulent.dk - Danish Joomla Services

User avatar
nixonie
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 100
Joined: Fri Jan 26, 2007 2:48 pm
Location: Sk, Macedonia

Re: some utf-8 characters not displayed correctly after db import

Post by nixonie » Thu Jun 21, 2007 7:06 am

I did not solve the problem - i simply made search and replace for problematic characters... i had to do something...
It seems that there are at least a couple of issues that can lead to this kind of problem since this looks very complicated.
I guess i should read more manuals :)
***** Manual signatures are NOT allowed ********** Manual signatures are NOT allowed *****_
Live long and prosper,
nn.

User avatar
092098jvm
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 230
Joined: Wed Aug 09, 2006 5:59 pm
Contact:

Re: some utf-8 characters not displayed correctly after db import

Post by 092098jvm » Thu Jun 21, 2007 5:47 pm

I'm starting to notice more and more problematic characters (diamond question marks, odd charcters, etc.) on a number of Joomla sites, even Joomla developer sites. Could be that I'm just more aware of it now that I'm having to fix it on my site. I've tried setting my browser character encoding to both UTF-8 and ISO-8859-1 and neither seems to display them properly. It seems to a corrupt data in the database.

User avatar
Kampp
Joomla! Guru
Joomla! Guru
Posts: 564
Joined: Tue Aug 30, 2005 9:18 am
Location: Denmark
Contact:

Re: some utf-8 characters not displayed correctly after db import

Post by Kampp » Thu Jun 21, 2007 5:53 pm

I just solved my problem by removing a .htaccess file that was in the root (Joomla site was in a folder).

The odd thing was the the .htaccess file contained the following:

Code: Select all

AddDefaultCharset UTF-8
php_value default_charset "UTF-8"
In other words this would normally be something you set to solve the problem. It must somehow interact with the database charset.
Last edited by Kampp on Thu Jun 21, 2007 5:56 pm, edited 1 time in total.
https://toolmaster.dk - Danish Joomla Services
https://joomla-hosting.dk - Danish Joomla hosting
https://joomla-konsulent.dk - Danish Joomla Services

User avatar
092098jvm
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 230
Joined: Wed Aug 09, 2006 5:59 pm
Contact:

Re: some utf-8 characters not displayed correctly after db import

Post by 092098jvm » Thu Jun 21, 2007 6:00 pm

Interesting. My sites are in subfolders as well. I'll try that and see what happens. Thanks!

obotor
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Fri Jul 06, 2007 7:58 am
Location: France

Re: some utf-8 characters not displayed correctly after db impor

Post by obotor » Wed Dec 10, 2008 11:54 am

After more than a year of inactivity on this topic I am going to revive it...
The .htaccess deletion solution is not always acceptable. Incidentally it would not work for some cases where there is no .htaccess...
I figured out the problem may be caused by phpMyAdmin (and its probable interaction with the charset setting of your browser). I advise using the regular command-line prose instead:

Code: Select all

mysqldump -r output_file_path -u user_name -p database_name
This solution solved a case summarised as:
- everything running under linux with UTF-8 locale support
- database export through phpmyadmin with DEFAULT CHARSET UTF8 (firefox2 browser)
- database dump deployment on a secondary fail-over server (database created with DEFAULT CHARSET UTF8)
- characters (from database) not displaying correctly on the website but ok in mysql command-line client.
Obotor
http://www.beorn-technologies.com


Locked

Return to “Language - 1.0.x”