1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Arabic character encoding problem

Discussion in 'Yahoo API' started by rajeeshvr, Oct 31, 2007.

  1. #1
    Hi All,

    I have a problem in arabic emails.The arabic emails are not encoding properly.I am a PHP developer, I am using MIME version 1.0 and passing the charset as UTF-8 but the arabic characters not encoding properly.For example,

    عزيزي عضو كليبسر

    الفيديو الذي قمت بتحميله قد حُذف بواسطة المدير
    Title : wewewew
    وجد المدير في هذا الفيديو بأنه غير لائق (ملاءم)


    you can see the problem .CAN ANYONE CAN HELP ME TO SOLVE THIS PROBLEM !!!! ITS VERY VERY VERY URGENT.........
     
    rajeeshvr, Oct 31, 2007 IP
  2. Fka200

    Fka200 Guest

    Best Answers:
    0
    #2
    Try Windows-1256
     
    Fka200, Nov 1, 2007 IP
  3. justforlebanon

    justforlebanon Peon

    Messages:
    193
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    TRY UNICODE
    it will work
     
    justforlebanon, Nov 1, 2007 IP
  4. rajeeshvr

    rajeeshvr Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I used the function for diffrent character encoding

    function getheader($user_id=""){
    global $ADMIN_ID;
    $headers = "MIME-Version: 1.0" . "\r\n";
    if($user_id!=""){
    $strqry="select langid from user,language where
    users.maillang=language.langid and language.langstatus ='1' and users.user_id='".$user_id."'";
    $rsquery=mysql_query($strqry,$this->link);
    if($rwsquery=mysql_fetch_array($rsquery)){
    $lang_id=strtolower($rwsquery["langid"]);
    if($langid==17 || $langid==20 || $langid==22){
    $headers .= "Content-type:text/html;charset=UTF-8;" . "\r\n";
    $headers .= "content-Transfer-encoding: 8bit" ."\r\n";
    }
    else if($langid==19){
    $headers .= "Content-type:text/html;charset=Shift_JIS;" . "\r\n";
    $headers .= "content-Transfer-encoding: 8bit" ."\r\n";
    }
    else if($langid==21){
    $headers .= "Content-type:text/html;charset=GB2312;" . "\r\n";
    $headers .= "content-Transfer-encoding: 8bit" ."\r\n";
    }
    else{
    $headers .= "Content-type:text/html;charset=UTF-8;" . "\r\n";
    $headers .= "content-Transfer-encoding: 8bit" ."\r\n";
    }
    }
    }
    else{
    $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
    $headers .= "content-Transfer-encoding: 8bit" ."\r\n";
    }
    $headers .= 'From: <'.$ADMIN_ID.'>' . "\r\n";
    return $headers;
    }


    instead of UTF-8 I also used windows-1256, but it doesn't worked. Please help me to solve the problem....
     
    rajeeshvr, Nov 14, 2007 IP
  5. Fka200

    Fka200 Guest

    Best Answers:
    0
    #5
    From what I understand you are receiving e-mails in Arabic and can't view them.

    Just go to View > Encoding > Change to UTF-8 or Windows 1256. It's one of those that'll work.
     
    Fka200, Nov 14, 2007 IP
  6. rajeeshvr

    rajeeshvr Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I have go the emails , but they are some special characters.They can't read properly.The arabic characters are listed from a php script file in which some variables are defined, I am using these variables for each language.For all other languages its working properly, but for arabic it doesn't encoding properly.Here is the email that I got,

    عزيزي عضو كليبسر
    بخصوص بطلبك عن التلويح بعلم للفيديو

    وافقنا بطلبك عن التلويح بعلم للفيديو بأنه غير لائق
    نترقب المزيد من دعمك في المستقبل

    تحيات


    the subject is also like this.I tried another mail function which will convert all characters to the UTF-8 encoding it works fine in gmail but not in yahoo and hotmail.

    please help me.
     
    rajeeshvr, Nov 21, 2007 IP
  7. ashrafweb

    ashrafweb Member

    Messages:
    67
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #7
    ashrafweb, Jan 7, 2008 IP
  8. houssem-hj

    houssem-hj Peon

    Messages:
    219
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Try to receive your emails with outlook Express.. not by web mail.

    And add the Arabic language from your setting->Control Panel (if it's not done).
     
    houssem-hj, Feb 27, 2008 IP
  9. ashrafweb

    ashrafweb Member

    Messages:
    67
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #9
    thank u all!!!
     
    ashrafweb, Mar 16, 2008 IP
  10. farhajr

    farhajr Active Member

    Messages:
    1,960
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    78
    #10
    their is one more easier way and that is install windows with arabic enabled and that would certainly give you the option to check in arabic or the normal english
     
    farhajr, Apr 18, 2008 IP
  11. UltimA-

    UltimA- Banned

    Messages:
    212
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Insert your windows CD , Install the Arabic Language and everything will be Fine
     
    UltimA-, Apr 18, 2008 IP
  12. palme

    palme Member

    Messages:
    320
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    33
    #12
    that is OK, if you live in arabic country , what if you live out of arabic zone.
    i do not use php but asp
    se Write persian
    may be this help.
     
    palme, Sep 29, 2008 IP
  13. sandeep_india

    sandeep_india Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    try mb_string function to change encoding
     
    sandeep_india, Oct 1, 2008 IP
  14. robinko

    robinko Peon

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Arabic (windows-1256)
     
    robinko, Feb 28, 2009 IP
  15. Jeddahbioc

    Jeddahbioc Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    ي قمت بتحميله قد حُذف بواسطة المدير
    Title : wewewew
    وجد المدير في هذا الفيديو بأنه غير لائق (ملاءم)[/B]

    you can see
     
    Jeddahbioc, Oct 2, 2011 IP
  16. mody_coder

    mody_coder Peon

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #16
    had similar problem resolved with windows-1256
     
    mody_coder, Dec 5, 2011 IP