SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Jul 2005
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy $body = htmlentities($body); AAAHHHHHHH

    Hello
    I am assuming cos you are reading this then you are well clever !!! cos the truth is I'm not(well not at this sort of stuff)
    Someone kindly gave me this little bit of script for this problem:-
    I have a contact page php and a html contact form everything works very well except when someone writes in chinese(don't worry I expect this as I have lots of chinese friends) however the email I receive is all rubbish
    Now this little script is the answer to my prayers (apparantly) but I don't have the foggyest idea what to do with it !!!! PLEASE help me..
    Gibby

  2. #2
    SitePoint Enthusiast shref's Avatar
    Join Date
    Nov 2004
    Location
    Egypt, Alexandria
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    mmm may you can use UTF-8 encoding
    Shreef
    blog: shreef.com
    twitter: @shreef

  3. #3
    SitePoint Member
    Join Date
    Jul 2005
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I'm an idiot

    aaaaaaaaaaahhhhhhh

    You are all very clever people who know what you are talking about
    If you tell me I need something- please also tell me how to do it

    I BEG YOU.... :'(

  4. #4
    SitePoint Member
    Join Date
    Jul 2005
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is utf-8 ?

  5. #5
    SitePoint Wizard REMIYA's Avatar
    Join Date
    May 2005
    Posts
    1,351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Set the encoding of your page as UTF-8, and also specify the form to accept its input and send the output in UTF-8. Then it'll be OK.

    Hope it helps

  6. #6
    SitePoint Member
    Join Date
    Jul 2005
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK this is great ... I know believe that this can be done - now the problem
    I DON'T KNOW WHAT I'M DOING - I'M A NERD !!!!!!!
    How do I encode the page to UTF-8 and what page or pages?
    I have a page which is a html form and a php page that does the magic stuff....
    How do I specify that the form can accept its input and then send the output in UTF-8. I know this sounds very simple to you guys but I really don't know a thing about writing scripts and stuff.
    Gibby

  7. #7
    SitePoint Enthusiast
    Join Date
    Apr 2004
    Location
    US
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    change the charset to UTF-8

  8. #8
    SitePoint Member
    Join Date
    Jul 2005
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Fantastic I can do this........
    This is for html page.......YES
    Do I do anything to the php page in the script?
    Thank you so much for all your help

  9. #9
    SitePoint Wizard REMIYA's Avatar
    Join Date
    May 2005
    Posts
    1,351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just make the meta tag to UTF-8 like this:
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    This has to do it


Bookmarks

Posting Permissions

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