wadboram Posted October 5, 2011 Share Posted October 5, 2011 I'm having a membership site (PHP script) allowing members to have a conversation in the forms of send/receive forms. These messages are saved inside the database (Inbox) When I translated the language files and ran the script, all the Arabic translated text showed questions marks. so I added AddDefaultCharset WINDOWS-1256 line inside the .htaccess file and everything worked fine. The character encoding in the browser is showing (Arabic Windows 1256) Then when testing to send/receive messages between members, I got strange characters like this ظ…طظ…ط¯ طµظ„ط§ط ط§ظ„ط¯ظ?ظ† in both their mail boxes and also inside the database. But when I change the browser's character encoding to UNICODE (UTF-, these messages appear right showing Arabic characters but the whole site's Arabic text shows question marks? I think there's a conflict in the encoding for the site... Can anyone help? Quote Link to comment https://forums.phpfreaks.com/topic/248508-arabic-charset-encoding-problem/ Share on other sites More sharing options...
Eyewash01 Posted October 5, 2011 Share Posted October 5, 2011 I'm no expert, but i've generally found that if you use UTF-8 for EVERYTHING, then all is good - so make sure any webpage charsets, the database charsets etc are all set to utf-8 - and i have yet to find any language characters (including stuff like russian, arabic etc) that display incorrectly. Also bear in my that if you use any string function like strlen or watever then be careful as the character are stored in more the one byte so you will need to use the multibyte string functions instead. Quote Link to comment https://forums.phpfreaks.com/topic/248508-arabic-charset-encoding-problem/#findComment-1276246 Share on other sites More sharing options...
wadboram Posted October 6, 2011 Author Share Posted October 6, 2011 I managed to fix it the primitive way cause I couldn't trace where the error is? Backed up everything,installed a fresh clean script and update necessary file. It took me around 3 hours. Quote Link to comment https://forums.phpfreaks.com/topic/248508-arabic-charset-encoding-problem/#findComment-1276410 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.