Best of joomla gives you news, joomla templates, tutorials and websites about Joomla , FireBoard and FireMessage official page.
| No account yet?   |
Welcome, Guest
Please Login or Register.    Lost Password?
Latest Release
Go to bottom Post Reply Favoured: 1
TOPIC:
#39569
[FIX] Message Preview UTF-8 5 Months, 2 Weeks ago  
Hi,
this is a combination of a solution proposed here (with a little twist for smile support)

I'm posting here the final changes (without the original)

in file ../components/com_fireboard/fireboard.php (line 129):
Code:


$message = urldecode(decode_unicode_url($msgpreview));



in file ../components/com_fireboard/fireboard.php (line 135):
Code:


echo $msgbody;


[anything in between should stay as it was before (original 1.0.4)]

somewhere in the same file (I did this at its end), add the described function:
Code:


function decode_unicode_url($str) //from the link provided above
{
...
}




That's it - you can see this working in an Hebrew (utf-8) site: Date Cafe - Dating
mtk (User)
Junior Boarder
Posts: 28
graphgraph
User Offline Click here to see the profile of this user
Gender: Male MtK - Smart Internet Solution Location: BGU
 
Last Edit: 2008/01/18 16:26 By mtk.
 
MtK - Smart Internet Solutions http://www.smartmtk.com
 
The administrator has disabled public write access.  
#39792
Re:[FIX] Message Preview UTF-8 5 Months, 2 Weeks ago  
Thank you very much!

It is still having some wrong char display - vietnamese Unicode utf-8.


Hope it will be fixed in next released!
viet4777 (User)
Gold Boarder
Posts: 278
graphgraph
User Offline Click here to see the profile of this user
Luyenkim.NET
 
Last Edit: 2008/01/19 20:16 By viet4777.
 
Luyenkim.Net
utf-8 Vietnamese language package will be complete in mid of Oct. http://luyenkim.net/home9/index.php?opti...5&id=282#282
 
The administrator has disabled public write access.  
#39829
Re:[FIX] Message Preview UTF-8 5 Months, 2 Weeks ago  
This is weird since there is no difference between "Vietnamese Unicode UTF-8" & "Hebrew UTF-8", that's the whole ides of the Unicode name...
mtk (User)
Junior Boarder
Posts: 28
graphgraph
User Offline Click here to see the profile of this user
Gender: Male MtK - Smart Internet Solution Location: BGU
 
MtK - Smart Internet Solutions http://www.smartmtk.com
 
The administrator has disabled public write access.  
#49157
Re:[FIX] Message Preview UTF-8 2 Months, 2 Weeks ago  
I got this message from my friend. It solves our utf-8 problem!

I solve my problem, so I share it.

First I replace escape(content) function in bojForumCore.js->fbGetPreview(content, sitemid) to encodeURIComponent(content);. I read that it is better than old escape.

And then I replace //echo utf8_encode($msgbody); to echo $msgbody; in fireboard.php as was suggested in this thread.

Finally I replace original function urldecode as follows

$message = utf8_urldecode(utf8_decode($msgpreview));

and body of function I found on php.net
function utf8_urldecode($str) {
$str = preg_replace("/%u([0-9a-f]{3,4})/i","\1;",urldecode($str));
return html_entity_decode($str,null,'UTF-8';;
}

It is work for me in encoding I use.
viet4777 (User)
Gold Boarder
Posts: 278
graphgraph
User Offline Click here to see the profile of this user
Luyenkim.NET
 
Luyenkim.Net
utf-8 Vietnamese language package will be complete in mid of Oct. http://luyenkim.net/home9/index.php?opti...5&id=282#282
 
The administrator has disabled public write access.  
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop