Abudayah
Abudayah

Reputation: 3875

encode to arabic proplem

i need change encode to windows-1256 like this:

print utf8_encode($text)

not ture:

print windows-1256_encode($text) 

Upvotes: 0

Views: 2198

Answers (3)

Ben Ayoub
Ben Ayoub

Reputation: 31

I had almost the same problem as you do where I wanted to retrieve Arabic data fields from SQL Server 2008 R2 with php using ODBC connection and then I found that getting the right information depends on using " iconv " like this:

echo iconv("","utf-8",$result);

So you can see I didn't mention the first encoding but the way I wanted to display my Arabic data (utf8).

Upvotes: 1

cweiske
cweiske

Reputation: 31068

Alternatively to Stewie's answer you can use the iconv functions.

Upvotes: 0

Related Questions