Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1

    Unicode through php mail()

    Hi all,

    I've a feedback form which sends email to a specific mail-id. I'm using the class.phpmailer.php obtained from http://phpmailer.sourceforge.net/

    I can send plain english text through this, but when I tried to send some unicode text, I get texts like .....%u0D06%u0D26%u0D4D%u0D2F%........

    I would like to know anybody have used this class and any solution to this problem.

    Or please let me know some other solutions.

    Edit: There are two attributes for the class, var $CharSet = "iso-8859-1"; and var $Encoding = "8bit";. I think something to do with them. But I don't know how...

    thanks,
    art
    Last edited by abduraooft; 08-09-2007 at 10:03 AM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    I've tried simply like with out using the phpmailer class

    PHP Code:
    mb_language("uni");
    $body chunk_split(base64_encode($Brief));
    mb_send_mail("mail@domain.com"$Subject$body,$headers); 
    and then tried to change the encoding and charset variable in the class also.

    But no progress has been made yet. I hope someone have the solution.

    please help me.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1

    solved partially..

    OK, even though I'm a little disappointed to have no comments on this thread(I'm not sure about the reason), let me say about the partial solution( and some additions to the original post )

    1)I've changed the encoding of the page from the default ANSI to utf-8.
    2) Changed the value of the var $CharSet from "iso-8859-1" to "utf-8" in the class.
    3) Put a wrap of <p style="Suitable font"></p> over the submitted message.

    Now, I can read the message clearly, but have some problem to read the subject since I couldn't effectively enclose the subject as in the case of body. (It might be due to the encoding of subject done in the class to prevent html entities )

    Firstly I had an AJAX form to send mail, but now it's not working. I believe it's due to BOM came with utf-8 encoding.

    Please correct me if I'm missing anything and any suggestion to work AJAX in a utf-8 encoded file is much appreciated.

    Thanks,
    art
    Last edited by abduraooft; 08-10-2007 at 01:01 PM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #4
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts
    Can't you use Prototype (the javascript framework) to help you with your Ajax problems?
    Last edited by StupidRalph; 08-12-2007 at 11:46 AM.
    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.

  • #5
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Thanks for the link, I'll have a try!

    but I think you mean http://www.prototypejs.org instead of .com

    Edit:Currently I'm using the techniques from http://absinth.modernmethod.com/sajax/
    Last edited by abduraooft; 08-10-2007 at 02:04 PM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #6
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts
    You will be correct. Evidently, I that wasn't copy and pasted. I'm glad you found it tho, how is it coming for you?

    I think that sajax is to early in its development stages to use anywhere in a non-developmental environment.
    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.

  • #7
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1

    How do I convert u+hexadecimal to its equivalent

    Let me re ask my question (based on current problem)...

    Is there any built in function available to convert a u+hexadecimal to its unicode character equivalent?

    (say, I want to convert ...%u0D06... to ...ആ... )

    Please give some hint.

    thanks,
    art
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #8
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts
    Unfortunately, I haven't dabbled in character encoding yet. Perhaps a quick glance at the online manual will prove profitable. Or even better, someone can come in here and add their input.
    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.


  •  

    Posting Permissions

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