1

Here is the code I use to write a paragraph in Arabic, but it does not work:

<p lang="ar" dir="rtl">....paragraph in Arabic.... </p>

this code displays ?????????

I use UTF-8 as the encoding type, and PSPad as editor.

Please do you have an idea about that?

msrd0
  • 7,816
  • 9
  • 47
  • 82

2 Answers2

1

Try put this before you echo anything to output stream on server php side:

header('Content-Type: text/html; charset=utf-8');
msrd0
  • 7,816
  • 9
  • 47
  • 82
Alex
  • 16,739
  • 1
  • 28
  • 51
0

If you use UTF-8, you need to tell the browser. If you use a server, you can do this directly with the HTTP protocol by adding ; charset=utf-8 after the Content-Type value, so the value could for example be text/html; charset=utf-8. If you don't use a Server or couldn't modify that variable, you can add this in the head tag of your HTML page:

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

You can also try this:

<meta charset="UTF-8" />
msrd0
  • 7,816
  • 9
  • 47
  • 82