About arrow Support Forums Make Text BiggerMake Text SmallerReset Text Size
Export Content Support
Welcome, Guest
Please Login or Register.    Lost Password?
utf8 support? (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: utf8 support?
#1147
jaleo (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
Re:utf8 support? 5 Months, 3 Weeks ago Karma: 0  
Steve wrote:
QUOTE:
jaleo
QUOTE:
My site content include chinese character.

It can not be exported correctly.

What version of Export Content are you using.
What version are you compiling for 1.0+ or 1.5+?
And how are you compiling by sections or static content items?
If by sections are you including static and or archived items?
Do the "download" and "remove all" icons appear at the top after you press "compile"?



Hello, administrator.

Export Content 1.7, Joomla 1.0.13.
export content by sections and do not include static and or archived items, and to compiling to 1.5+
I can see "download " icons and can download it.
but after i import on joomla 1.5.1 site, chinese characters are not correct, like" & # 8217".
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/03/05 21:12 By jaleo.
  The administrator has disabled public write access.
#1148
Steve (Admin)
Admin
Posts: 176
graph
User Offline Click here to see the profile of this user
Re:utf8 support? 5 Months, 3 Weeks ago Karma: 3  
Hi jaleo

Is it traditional or simplified.

If you can PM me a link to the chinese alphabet you are using and when I get time I will try and put a patch together.
 
Report to moderator   Logged Logged  
 
Regards Steve.
  The administrator has disabled public write access.
#1149
jaleo (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
Re:utf8 support? 5 Months, 3 Weeks ago Karma: 0  
Source site: http://www.Bluelibrary.net (Joomla 1.0.13)
Target site: http://www.Bluelibrary.net/jm15/index (Joomla 1.5.1 you can see simplified chinese character are not correct, such as "Godaddy æS¬æÚä¼Üæ" )

and what's your email? i want to send you exported data.
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/03/05 22:51 By jaleo.
  The administrator has disabled public write access.
#1150
Steve (Admin)
Admin
Posts: 176
graph
User Offline Click here to see the profile of this user
Re:utf8 support? 5 Months, 3 Weeks ago Karma: 3  
Hi jaleo

When you look at content items under the edit window in Export Content are the characters corrupted or are they as they should be?

I had a look at the destination site and changed the encoding in the browser to traditional which does get most characters up although I don't know if they are correct as I can't read Chinese.

Have you tried another template just to make sure?

QUOTE:
and what's your email? i want to send you exported data.

steve at bestdownloadsites.com put Export content in the subject line.
 
Report to moderator   Logged Logged  
 
Regards Steve.
  The administrator has disabled public write access.
#1151
jaleo (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
Re:utf8 support? 5 Months, 3 Weeks ago Karma: 0  
i cant read it after i choose traditional chinese encode,
i have send you email today. please check it.
Thanks.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1153
Steve (Admin)
Admin
Posts: 176
graph
User Offline Click here to see the profile of this user
Re:utf8 support? 5 Months, 3 Weeks ago Karma: 3  
I have just had a look at the generated sql and can see what the problem is.

Export content assumes that content compiled on Joomla 1.0+ is not utf8 and will attempt to convert it over.

So on the source site if you go to:
/administrator/components/com_export_content/convert_img.php
This is where all the character conversions take place when you press the compile buttons.

You will see about line 23 function numeric_html($text){ this function goes down to about line 2208 you need to remove everything in between as shown below:

Code:

function numeric_html($text){ REMOVE CODE return strtr($text, $cr); //return $text; }
And then just under that about line 2210 you will see:
Code:

/**************************************** High end numeric converter ******************************************/ function high_order($text){ $text = preg_replace('/([\xc0-\xdf].)/se', "'&#' . ((ord(substr('$1', 0, 1)) - 192) * 64 + (ord(substr('$1', 1, 1)) - 128)) . ';'", $text); $text = preg_replace('/([\xe0-\xef]..)/se', "'&#' . ((ord(substr('$1', 0, 1)) - 224) * 4096 + (ord(substr('$1', 1, 1)) - 128) * 64 + (ord(substr('$1', 2, 1)) - 128)) . ';'", $text); return $text; }
Change this to:
Code:

function high_order($text){ return $text; }
Once you change this it should compile all your Chinese characters as they are now in the source site. Please let me know how you go.
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/03/08 01:49 By Steve.
 
Regards Steve.
  The administrator has disabled public write access.
#1154
jaleo (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
Re:utf8 support? 5 Months, 3 Weeks ago Karma: 0  
Export empty content.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1155
montemedia (User)
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
Re:utf8 support? 5 Months, 3 Weeks ago Karma: 0  
Hello Steve,

The same situation is here. Now I can install exported content, but, actually, there is nothing to import - no content.

I have searched through my previously exported content and have noticed a lot of strange characters, with no special rule to repeat.
I have compared it with UTF-8 table I have, a lot of them does not have responding numeric code.

As far as my language is concerned, and the most of Middle EU countries, we need only 10-12 characters: ž, , , š,  and responding capital letters.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1159
Steve (Admin)
Admin
Posts: 176
graph
User Offline Click here to see the profile of this user
Re:utf8 support? 5 Months, 3 Weeks ago Karma: 3  
Sorry it took so long to get back guys I have been very busy with paid work.
jaleo
Sorry the first one should look like this:
Code:

function numeric_html($text){ REMOVE CODE return $text; }
And the second like this:
Code:

function high_order($text){ return $text; }
That should bypass any character conversion. montemedia You will need to add a bit of code because when moving to Joomla 1.0+ series we are using an XML install and XML will not parse certain characters so they must be converted. So if you only want to move Serbian, Croatian, Montenegrin you need change the first function like so:
Code:

function numeric_html($text){ REMOVE CODE return $text; }
If you paste it in make sure you don't leave the "REMOVE CODE" text there. And the second one like this:
Code:

/**************************************** High end numeric converter ******************************************/ function high_order($text){ $text = preg_replace('/([\xc0-\xdf].)/se', "'&#' . ((ord(substr('$1', 0, 1)) - 192) * 64 + (ord(substr('$1', 1, 1)) - 128)) . ';'", $text); $text = preg_replace('/([\xe0-\xef]..)/se', "'&#' . ((ord(substr('$1', 0, 1)) - 224) * 4096 + (ord(substr('$1', 1, 1)) - 128) * 64 + (ord(substr('$1', 2, 1)) - 128)) . ';'", $text); return $text; }
You should just copy-paste the attached code and replace the above function in convert_img.php. http://www.bestdownloadsites.com/export_content/images/fbfiles/files/ Serbian-Croatian-Montenegrin.txt
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/03/09 19:22 By Steve.
 
Regards Steve.
  The administrator has disabled public write access.
#1161
montemedia (User)
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
Re:utf8 support? 5 Months, 3 Weeks ago Karma: 0  
Excuse me, Steve... where is the "Attached code"?

EDIT: URL with code suddenly appeared Thanks, I will try and inform you.

EDIT 2: Sorry Steve, again - nothing to import.
How to say... XML generates exact number of articles, but nothing inside - neither title, nor content.
I edited your txt file, adding some " ' " characters in front of Central European letters.
BTW, this is for Slovenian and Bosnian language, too. I am not sure about Slovak and Czech language, but I will check it up and inform you.
 
Report to moderator   Logged Logged  
 
Last Edit: 2008/03/09 19:58 By montemedia.
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop