After I try to execute this code to print an Arabic string: print("إضافة"); I recieve this output: إضاÙØ©. Basically utf8_decode() it I'll get ?????. I've "AddLanguage ar" during my apache configuration however it does not help. How do you print this Arabic string?

Also set your page language to utf8 eg:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

after which view it if labored. In the event that still does not work, go and look at this, it's complete solution for that arabic language using PHP:

You might want to read this too:

It may be essential to indicate towards the browser which charset you're using -- I am speculating it's UTF-8.

To be able to achive that, you could try putting this part of code at the outset of your script, before any output is produced :

header('Content-type: text/html; charset=UTF-8');

[utf8_decode][1] will attempt to decode your string from UTF-8 to latin1, which isn't suited to Arabic figures -- hence the '?' figures.

You might want to set

default_charset = "utf-8"

inside your php.ini. Default charset directive instructs the server to create correct content type header.

You may also get it done in runtime:

ini_set('default_charset', 'utf-8');

You may even wish to look at your browser font whether it has Arabic support. Stay with common fonts like Arial Unicode and Occasions New Roman.