Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Location
    Sana'a
    Posts
    183

    mysql and arabic

    hello guys i need your help.

    How can mysql display Arabic well. Right now it is displaying them as ??????? . I'm using mambo and everyting is working fine on the local server but when online all i see is question marks .

    here is the server info

    Server version: 4.1.21-standard
    Protocol version: 10
    Server: Localhost via UNIX socket
    User: [email protected]
    MySQL charset: UTF-8 Unicode (utf8)


    the local server of the mysql is MySQL 4.0.24-nt .


    how can i fix this problem?

    Thanks in advance.

  2. #2
    Join Date
    Mar 2004
    Location
    USA
    Posts
    4,342
    This is one of the oldest problems.

    I recommend you use UTF-8.

    Here is what you do:

    * Make database/forums and text/varchar fields all utf charset.

    After connecting to the database use this query:

    PHP Code:
    mysql_query("SET NAMES `utf8`"); 
    It should all work fine. If not, you are doing something wrong

    Peace,
    Testing 1.. Testing 1..2.. Testing 1..2..3...

  3. #3
    Join Date
    Oct 2003
    Location
    Sana'a
    Posts
    183
    hi thanks for the reply. it is all UTF-8. There is another problem, the person has to change the browser encoding to UTF-8 in order to see the arabic text. Is there a way to fix this?

    I mean make it default so that the person don't have to change anything. Even when I change the browser encoding to UTF-8 then click on a link then I have to change it again for that page.

    thanks again

  4. #4
    Join Date
    Mar 2004
    Location
    USA
    Posts
    4,342
    Yes, use meta tag charset.

    Code:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    Peace,
    Testing 1.. Testing 1..2.. Testing 1..2..3...

  5. #5
    Join Date
    Oct 2003
    Location
    Sana'a
    Posts
    183
    that was there before but i think i'm missing something. It was a file . Now everything looks to be fixed. Thanks for your help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •