Hello all,
When reading a file contents(html or any) using PHP how are we suppose to process the characters that are not in English alphabet?
Unfortunatly this message editor of PHPBB is converting all non English character to ? but i have tried to give a example below.
For example in Wspólnie pa?dziernika (i think its Polish), characters like ó,? are treated as ?(was suppose to be a square rather that a ?) when PHP is used to read them from a file. Is there a simple fix for it?
I hope I have made myself clear.
Thanks
Girish R
Problems in characters of non-English language
Moderator: General Moderators
Yep, looks like a Polish or Czech to me.
Perhaps you need to set right encoding for html page (Assuming that file is sent to browser then).
As far as I know, fread is binary safe. Actually, PHP is not supposed to know anything about encodings
but read the file contents as-is. Still there are functions for unicode ([php_man]mb_[/php_man]*), and
[php_man]recode[/php_man] extension.
Perhaps you need to set right encoding for html page (Assuming that file is sent to browser then).
As far as I know, fread is binary safe. Actually, PHP is not supposed to know anything about encodings
but read the file contents as-is. Still there are functions for unicode ([php_man]mb_[/php_man]*), and
[php_man]recode[/php_man] extension.