php arabic encoding

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zedan
Forum Newbie
Posts: 1
Joined: Thu Aug 18, 2005 12:18 pm

php arabic encoding

Post by zedan »

Hallo
i have problem in arabic encoding
i have built a page using front page in arabic after i saved that page and every thing is OK, i closed front page and open it again to add some variables that hold arabic data after i saved the page and display it i found that every thing GONE no arabic its some thing else but not arabic i tried many ways to find out how to solve but no way.

i heard that some built-in functions can help me like mb-detect-encoding but its not working..

i m buildling a forum and i stop coding until i solve this problem.


thanks
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

Okay, several issues.

First, frontpage is really not ideal for non-american languages. A really similar package that has better support for arabic would be http://www.nvu.com .

Its more recent, has better multi-language support, and should suit your needs.

Next, I highly recommend using UTF-8 for your page. That way you can present multiple languages instead of just one, and in a format that most portable browsers (cellphones, etc) can support.

To do so, you need to place this tag inside

Code: Select all

<head> ... </head>
:

Code: Select all

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
If you have further problems, we can try to help from there.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I'd also recommend sending the UTF-8 header too:

Code: Select all

header('Content-Type: text/html; charset="UTF-8"');
Post Reply