homepage Welcome to WebmasterWorld Guest from 54.226.5.29
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
Pubcon Website
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library : Charter : Moderators: coopster & eelixduppy & jatar k

PHP Server Side Scripting Forum

    
all to utf-8
nick patrick




msg:3855866
 3:50 pm on Feb 23, 2009 (gmt 0)

i want to convert the text to utf-8 all type of text to every language arabic etc

 

whoisgregg




msg:3855881
 4:04 pm on Feb 23, 2009 (gmt 0)

Perhaps utf8_encode [php.net]() would be helpful then?

nick patrick




msg:3855885
 4:08 pm on Feb 23, 2009 (gmt 0)

no because
i tried with windows-1256
but its not working when i tried to convert
$st = preg_replace("/([\340-\357])([\200-\277])([\200-\277])/e",
"'&#'.((ord('\\1')-224)*4096 + (ord('\\2')-128)*64 + (ord('\\3')-128)).';'",
$st);
$st = preg_replace("/([\300-\337])([\200-\277])/e",
"'&#'.((ord('\\1')-192)*64+(ord('\\2')-128)).';'",
$st);

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved