I had declared the character set as UTf-8 and also tried iconv to convert the data to utf-8 but the result ??????how can i solve this?
Php Arabic character set encoding
Moderator: General Moderators
Php Arabic character set encoding
I need to display data from a table (which is arabic data) from sharepoint (sql server 2008) usng php. when i tried this its showing question mark.
I had declared the character set as UTf-8 and also tried iconv to convert the data to utf-8 but the result ??????how can i solve this?
Any reply is appreciated.Thanks
I had declared the character set as UTf-8 and also tried iconv to convert the data to utf-8 but the result ??????how can i solve this?
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Php Arabic character set encoding
I assume when you say "declared the character set as UTf-8" that you mean you have set the character encoding for the HTML page to UTF-8. Are you sure that you have done this correctly? Are you sure the data coming from the database is UTF-8?
(#10850)
Re: Php Arabic character set encoding
Thanks for the reply...yes I declared the html page character set as UTF-8.the data coming from database is UTF-8 ie (MS SQL Server DB).I retrieved the data and the content is arabic which is working fine when retrived in asp pages..where as ????????? question mark on php page.........I want to solve the issue which is in php pages.(question mark ????????) 
Re: Php Arabic character set encoding
Can you post some code showing us what you are doing? It is possible your database code is not encoding the strings properly. Or it could be that PHP is confused with the multibyte strings for UTF-8 and you need to use multibyte safe methods.
Re: Php Arabic character set encoding
Thanks for the reply...i'm fetching data from sharepoint server directly(sql server 2008) the data is arabic its saving direclty from sharepoint server...so i dont know what type of encoding is sharepoint using in saving the data ...
I didnt understand about mulitbyte string of UTF-8 ..can u pls explain or show an example..
I didnt understand about mulitbyte string of UTF-8 ..can u pls explain or show an example..
Re: Php Arabic character set encoding
looks like the database may not be configured correctly
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
Re: Php Arabic character set encoding
But the same db is working fine in asp.net page ie the arabic is displaying...the question mark is shown only in php page...So it cant be concluded as the DB problem..Vegan wrote:looks like the database may not be configured correctly
Re: Php Arabic character set encoding
The database connection might not be the correct encoding. Take a look at this thread for ideas
viewtopic.php?f=2&t=132655
If it's not the database encoding or connection type, then look at php multibyte functions. Take a look at this page for help
http://developer.loftdigital.com/blog/p ... cheatsheet
viewtopic.php?f=2&t=132655
If it's not the database encoding or connection type, then look at php multibyte functions. Take a look at this page for help
http://developer.loftdigital.com/blog/p ... cheatsheet