I am using Codeignter, in my view page
Method 1: views/show.php
echo @html_entity_decode("﷼", ENT_COMPAT | ENT_HTML401, "UTF-8");
Html Output
﷼
This works fine.
BUT.
Method 2: In config/constants.php, I have defined constant value for the arabic word like this:
define('ARABIC_WORD', '﷼');
and in my view page, views/show.php
echo @html_entity_decode(ARABIC_WORD, ENT_COMPAT | ENT_HTML401, "UTF-8");
Html output:
?
I need to work for second option (method 2), so that I can define the values. Please anyone out there to help me in this to let me know what I have made mistake and if any new suggestions for this.
Change your constant definition from
define(ARABIC_WORD, '﷼');
to
define('ARABIC_WORD', '﷼');
EDIT:
You are not storing your file as UTF-8 encoding and it is changed to "?". I have checked it, When I use ANSI
encoding, it is changed to ?
. Your text editor should have an option called encoding somewhere. Change the encoding to UTF-8
and then paste/write the line again and save it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With