Cloning site with Chinese characters | Report Bugs | Forum Archive

The free forums are no longer in use. It remains available as read-only archive.

Avatar
Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
The forums are currently locked and only available for read only access
sp_TopicIcon
Cloning site with Chinese characters
September 29, 2010
12:49 am
Avatar
Ross
Member
Members
Forum Posts: 11
Member Since:
September 28, 2010
sp_UserOfflineSmall Offline

I have chinese characters in my files and in the database. After I cloned the website, I found all the filenames and database entries become strange character. Is it a bug? Or can I use any other method to workaround?

September 29, 2010
4:42 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Hi there! This is not a bug, you need to make sure the restored database matches your original site encoding, so, when restoring, adjust the "Character set to the file" option from the XCloner.php screen to match the encoding of your database, try utf-8, or latin encodings

Ovidiu

 

 

September 29, 2010
6:00 am
Avatar
Ross
Member
Members
Forum Posts: 11
Member Since:
September 28, 2010
sp_UserOfflineSmall Offline

Thank you very much for your quick reply.

 

How about the file name then? When I open the tar file, I found out that all the chinese characters become strange character.

 

Thank you again.

September 29, 2010
6:03 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Can you please post a screenshot of the filename system you have there and how you see them?

 

Regards, Ovidiu

September 29, 2010
8:26 am
Avatar
Ross
Member
Members
Forum Posts: 11
Member Since:
September 28, 2010
sp_UserOfflineSmall Offline

I checked. It's my ftp client which can't show the character correctly. The file are extracted correctly. Thanks.

 

For the database issue, I do another restore, while setting the character set to utf8. But still there is strange characters, and all the words become ? in the website. Maybe I can try different character settings to see. Thank you again. You are very helpful.

September 30, 2010
5:17 am
Avatar
Ross
Member
Members
Forum Posts: 11
Member Since:
September 28, 2010
sp_UserOfflineSmall Offline

Hello. Ovidiu. I think it is the dumping of the database has problem.

Here is a few lines extracted from the sql file of the backup:

INSERT INTO joomla_winnie_joomgallery VALUES ('1','1','WRC??', 'wrc-1','','', '2010-09-27 12:10:18','0','0','0','0','1','WRC??_20100927_1885405396.jpg',  'WRC??_20100927_1885405396.jpg','0', '62','1','0','-1','','','');
INSERT INTO joomla_winnie_joomgallery VALUES ('2','1','??????','-2','','','2010-09-27 12:10:19','0','0','0','0','1','??????_20100927_1290422790.jpg','??????_20100927_1290422790.jpg', '0','62','1','0','-2','','','');
INSERT INTO joomla_winnie_joomgallery VALUES ('3','1','????4???','4-3','','','2010-09-27 12:10:19','0','0','0','0','1','????4???_20100927_1275893409.jpg', '????4???_20100927_1275893409.jpg', '0','62','1','0','-3','','','');
INSERT INTO joomla_winnie_joomgallery VALUES ('4','1','????????','-4','','','2010-09-27 12:10:19','0','0','0','0','1','????????_20100927_1317739847.jpg', '????????_20100927_1317739847.jpg', '0','62','1','0','-4','','','');

 

If I dump the database using phpmyadmin, here is what I get:

(1, 1, 'WRC賽車', 'wrc-1', '', '', '2010-09-27 12:10:18', 0, 0, 0, 0, 1, 'WRC賽車_20100927_1885405396.jpg', 'WRC賽車_20100927_1885405396.jpg', 0, 62, 1, 0, -1, '', '', ''),
(2, 1, '世界傳統民居', '-2', '', '', '2010-09-27 12:10:19', 0, 0, 0, 0, 1, '世界傳統民居_20100927_1290422790.jpg', '世界傳統民居_20100927_1290422790.jpg', 0, 62, 1, 0, -2, '', '', ''),
(3, 1, '主題公園4個建築', '4-3', '', '', '2010-09-27 12:10:19', 0, 0, 0, 0, 1, '主題公園4個建築_20100927_1275893409.jpg', '主題公園4個建築_20100927_1275893409.jpg', 0, 62, 1, 0, -3, '', '', ''),
(4, 1, '伊斯蘭圆頂清真寺', '-4', '', '', '2010-09-27 12:10:19', 0, 0, 0, 0, 1, '伊斯蘭圆頂清真寺_20100927_1317739847.jpg', '伊斯蘭圆頂清真寺_20100927_1317739847.jpg', 0, 62, 1, 0, -4, '', '', ''),

The file from phpmyadmin is correctly encoded, while the one in the backup is all ?. I used the same program to view them as well. So it shouldn't be the viewer problem.

And I can't find any option in saving the database in the character set. Thank you.

September 30, 2010
5:37 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

When creating the backup, did you enable the Active checkbox for the mysqldump utility? If no,

try and check that option and see if it helps, check first the Info tab in the XCloner Config to see if

mysqldump is supported. If you did select it however on the backup you create, try and disable it

 

Regards, Ovidiu

September 30, 2010
7:29 am
Avatar
Ross
Member
Members
Forum Posts: 11
Member Since:
September 28, 2010
sp_UserOfflineSmall Offline

If I use mysqldump utility, there is no problem. But I am using a share host, and I don't have access to mysqldump. So is there any other workaround?

September 30, 2010
8:24 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

While we are looking into this issue, here is something you can try:

 

1. locate the common.php file inside the administrator components xcloner compoonent folder

2. at the end of it, just before ?> line, add this code

@mysql_query("SET NAMES 'utf8'");

 

Try and generate again the mysql backup and see if it helps!

 

Regards, Ovidiu

September 30, 2010
3:51 pm
Avatar
Ross
Member
Members
Forum Posts: 11
Member Since:
September 28, 2010
sp_UserOfflineSmall Offline

Thank you very much. It solved the problem. But after migration from development to production server, another error occured. When I try to backup, after the step of saving the database, it said the tar file is ready and asked me to click and proceed. And after I click, the following error occurs.

Forbidden

You don't have permission to access /administrator/components/com_xcloner-backupandrestore/index2.php
on this server.

Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.

 

The problem is, I restore all the things using direct access without ftp layer. Therefore all the files should be owned by the user apache. And I checked the index2.php. The owner of indeed is apache, and it has the permission of 644. I tried to set it to 777. The error still exists. I am not sure what kind of problem is that. Before migration, everything is alright.

Again. Thank you very much for your patient.

Forum Timezone: America/Chicago
Most Users Ever Online: 867
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
mlguru: 30
Django29: 29
Andy: 21
D: 21
Marcus: 20
Jamie F: 19
Member Stats:
Guest Posters: 737
Members: 9460
Moderators: 2
Admins: 3
Forum Stats:
Groups: 3
Forums: 7
Topics: 2397
Posts: 8236
Newest Members:
Xplorers Club
Moderators: TriP: 0, Steve Burge: 0
Administrators: Ovidiu Liuta: 2484, Victor Drover: 1, Valentin Barbu: 0