Reputation: 3875
i need change encode to windows-1256 like this:
print utf8_encode($text)
not ture:
print windows-1256_encode($text)
Upvotes: 0
Views: 2198
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
Reputation: 31068
Alternatively to Stewie's answer you can use the iconv functions.
Upvotes: 0
Reputation: 3121
did you try the function mb_convert_encoding
see: http://www.php.net/manual/en/function.mb-convert-encoding.php and http://www.php.net/manual/en/mbstring.supported-encodings.php
Upvotes: 0