Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 05 Sep 2009, 04:56
saji09 saji09 is offline
 
Join Date: Aug 2009
Text parsing problem in arabic language..

The problem im facing is mentioned in detail below and kindly check the attached screenshot to get clear idea what im talking about...


When arabic posted on an English forum ---> Shows first half of image
When arabic posted on an Arabic Forum --> Shows Second half of the image

My only concern is, where is the point from where i could figure out vbulletin is differentiating and inserting content in the threads, postparsed and post table.... There must a check or something which seprating the output...


What i have tested and found is that when text entered from charset=ISO-8859-1 format, which is basically english version of forum, no matter i paste arabic in the editor its wel encoded [DESIRED]

but when i change the language of the forum it set charset=windows-1256, Which ends up producing unicode and stuff when i paste an arabic text in the new thread or post [NOT DESIRED].

Any one who solve this problem is a When arabic posted on an English forum ---> Shows first half of image
When arabic posted on an Arabic Forum --> Shows Second half of the image

My only concern is, where is the point from where i could figure out vbulletin is differentiating and inserting content in the threads, postparsed and post table.... There must a check or something which seprating the output...


What i have tested and found is that when text entered from charset=ISO-8859-1 format, which is basically english version of forum, no matter i paste arabic in the editor its wel encoded [DESIRED]

but when i change the language of the forum it set charset=windows-1256, Which ends up producing unicode and stuff when i paste an arabic text in the new thread or post [NOT DESIRED].

Any one who solve this problem is a GENIUS
Attached Images
File Type: jpg prob.jpg (109.1 KB, 18 views)
Reply With Quote
  #2  
Old 06 Sep 2009, 08:28
saji09 saji09 is offline
 
Join Date: Aug 2009
Solved...

use iconv("windows-1256", "UTF-8",$text);

by default iconv is available in php5.x

you can also download php_iconv.dll or iconv.dll and place it in php/extensions

your problem will be solved, but make sure your browser encoding in charset=utf-8 and if you are quering from database its not setting charset like mysql_set_charset('utf8');


Rest its working like charm
Reply With Quote
  #3  
Old 05 Jan 2016, 08:20
JesWhite JesWhite is offline
 
Join Date: Apr 2014
Real name: Jes
Originally Posted by saji09 View Post
use iconv("windows-1256", "UTF-8",$text);

by default iconv is available in php5.x

you can also download php_iconv.dll or iconv.dll and place it in php/extensions

your problem will be solved, but make sure your browser encoding in charset=utf-8 and if you are quering from database its not setting charset like mysql_set_charset('utf8');


Rest its working like charm
hii..
i have a problem like you...
if i add an ascii code, ascii code changing to recording to mysql...
how can i fix it?
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 16:35.

Layout Options | Width: Wide Color: