Web Design Forums

PHP

Have questions about PHP? Ask them here and our experts will assist you before you know it! You can also find help in the documentation at PHP.net.

characters being replaced when sending mail from a contact page



Site of the Month Nominations
ENTER YOUR SITE NOW!

Reply
 
LinkBack Thread Tools
Old June 27 '09, 03:33 PM (#1)
igeek is offline
Curiosity didn't kill the cat
 
igeek's Avatar
 
Join Date: October 2005
Posts: 202
igeek is on a distinguished road
characters being replaced when sending mail from a contact page

Im using the php mail() function

Quote:
mail($send_email, $subject, "Forma de Contacto para Sitio de Web\n"
."Nombre Completo: ".$fullname."\n"
."Email: ".$email."\n"
."Teléfono: ".$phone."\n"
."Título: ".$title."\n"
."Empresa: ".$company."\n"
."Dirección: ".$address."\n"
."Ciudad: ".$city."\n"
."Estado o Provincia: ".$state."\n"
."Código Postal: ".$zip."\n"
."País: ".$country."\n"
."Método de contacto preferido: ".$contactmethod."\n"
."Favor de añadirme a su lista de email para recibir su boletín informativo: ".$signup."\n"
."Intereses, Preguntas o Comentarios: ".$message, $headers_clients);
Some of the characters are being replaced in the text feilds with english but should be in spanish when the form is sent
Is there a way to specify what language the mail() function uses?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 28 '09, 02:54 PM (#2)
mlseim is offline
WDF Staff
 
mlseim's Avatar
 
Join Date: April 2004
Location: Cottage Grove, Minnesota
Posts: 3,401
mlseim has much to be proud ofmlseim has much to be proud ofmlseim has much to be proud ofmlseim has much to be proud ofmlseim has much to be proud ofmlseim has much to be proud ofmlseim has much to be proud ofmlseim has much to be proud ofmlseim has much to be proud ofmlseim has much to be proud of
This is an issue regarding utf-8

See this:
http://www.google.com/#hl=en&q=force...fp=OzgK0dwM7rU

I know you can use utf-8 on websites and encoding foreign characters.
I'm not so sure about forcing it with emails. I would think a recipients email
client would default to utf-8, but maybe it doesn't?

An interesting topic.

Maybe other WDF members might have some better ideas on this?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 28 '09, 07:48 PM (#3)
imagn is offline
WDF Regular
 
imagn's Avatar
 
Join Date: July 2007
Location: Los Angeles
Posts: 156
imagn will become famous soon enough
In your variable for headers you can set the language type - though I'm not 100% certain this will solve your problem.

// content language (en = English)
header('Content-language: en');
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 29 '09, 11:30 PM (#4)
igeek is offline
Curiosity didn't kill the cat
 
igeek's Avatar
 
Join Date: October 2005
Posts: 202
igeek is on a distinguished road
Quote:
Originally Posted by imagn
In your variable for headers you can set the language type - though I'm not 100% certain this will solve your problem.

// content language (en = English)
header('Content-language: en');

thanks! Its worth a try!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old June 29 '09, 11:31 PM (#5)
igeek is offline
Curiosity didn't kill the cat
 
igeek's Avatar
 
Join Date: October 2005
Posts: 202
igeek is on a distinguished road
Here is a list of the characters being converted from spanish to english.. weird!

á = a

é = i

í = m

ó = s

ú = z

ñ = q

¡ = !

¿ = ?

ü = |


has anyone else run into this before? I think it is defaulting to utf-8.. please help!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 3 '09, 07:51 AM (#6)
ketanco is offline
WDF Regular
 
ketanco's Avatar
 
Join Date: October 2007
Posts: 228
ketanco is an unknown quantity at this point
i have a similar issue... my webhost godaddy says it is possible to have foreign language websites under their hosting but i need to modify htaccess file. i dont know how to do that....i tried modifying the database column types to that language but didnt work...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 17 '09, 10:08 PM (#7)
igeek is offline
Curiosity didn't kill the cat
 
igeek's Avatar
 
Join Date: October 2005
Posts: 202
igeek is on a distinguished road
I still have the same issue not luck correcting it..

the .htaccess file is usually in your root folder of the web server you may have to logon
to the server control panel to see it.

What did they say to change in the .htaccess file?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

  Web Design Forums » Programming Help » PHP

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending a link in the mail() function aburningflame PHP 7 March 16 '09 03:03 AM
sending people to next page after password protected homepage ? web_dezigns General Web Design Discussion 1 February 4 '08 12:32 AM
Sending mail echoSwe Other Languages 6 November 28 '04 06:20 PM
Sending data from one page to another JR PHP 9 December 26 '03 09:03 PM

 
User Infomation
Your Avatar

Site Of The Month

Ticket Cake
Ticket Cake

Ticket Cake is a drupal based event ticketing platform. It features that ability to browse events and share them.

Nominate Your Site Now!

Advertisement
WolfCMS.org

Latest Articles
- by RickM
- by bfsog

Advertisement

Partner Links



All times are GMT -4. The time now is 02:37 AM.


WebDesignForums.net is Copyright © 2010 RikeMedia.

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163