Web Design Forums

Welcome! Please register or log in: Forgot your password? Why register?
You are here: Web Design Forums » Programming Help » PHP » characters being replaced when sending mail from a contact page RSS

characters being replaced when sending mail from a contact page

This thread was started by igeek and has been viewed 780 times, and contains 6 replies, with the last reply made by igeek.
Post Reply
1
55 points at 100%
igeek, Curiosity didn't kill the cat Private message   E-mail
Posted June 27 '09 at 04:33 PM
      Posts: 202
Im using the php mail() function

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?

Advertisement Register for free to hide these ads and participate in discussions!

2
1,251 points at 99% Moderator Repute
mlseim, WDF Moderator Private message  
Posted June 28 '09 at 03:54 PM
      Posts: 3,098
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?
If it's zero degrees outside today, and it's supposed to be twice as cold tomorrow, how cold is it going to be?
mlseim is online now! Reply

3
58 points at 100%
imagn, WDF Addict! Home page   Private message  
Posted June 28 '09 at 08:48 PM
      Posts: 156
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');

4
55 points at 100%
igeek, Curiosity didn't kill the cat Private message   E-mail
Posted June 30 '09 at 12:30 AM
      Posts: 202
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!

5
55 points at 100%
igeek, Curiosity didn't kill the cat Private message   E-mail
Posted June 30 '09 at 12:31 AM
      Posts: 202
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!

6
View ketanco's reputation
ketanco, Must... Post... More...! Private message   E-mail
Posted July 3 '09 at 08:51 AM
      Posts: 228
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...

7
55 points at 100%
igeek, Curiosity didn't kill the cat Private message   E-mail
Posted July 17 '09 at 11:08 PM
      Posts: 202
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?

Post Reply

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