472,353 Members | 1,902 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Show UTF-8 in the Subject of the mail

I've written the following codes to include utf-8 wordings in both the
subject and the content.

$headers = "MIME-Version: 1.0\r\n".
"Content-type: text/plain; charset=utf-8\r\n".
"From: ab*@abc.com";

mail("ta****@abc.com", "<some utf-8 wordings as subject>",
"<Another utf-8 wordings as content>", $headers);

In the email received, the content is fine , however, the subject
becomes 'strange characters'... How to solve this problem? Thanks a lot.

Dec 2 '05 #1
1 2365
ka****@gmail.com wrote:
I've written the following codes to include utf-8 wordings in both the
subject and the content.

$headers = "MIME-Version: 1.0\r\n".
"Content-type: text/plain; charset=utf-8\r\n".
"From: ab*@abc.com";

mail("ta****@abc.com", "<some utf-8 wordings as subject>",
"<Another utf-8 wordings as content>", $headers);

In the email received, the content is fine , however, the subject
becomes 'strange characters'... How to solve this problem? Thanks a lot.


Check out RFC 2047. You can use something like:
Subject: =?utf-8?b?...base64-encoded-subject...?
or
Subject: =?utf-8?q?...quoted-printable-subject...?
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Dec 4 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Erik Neves | last post by:
I need help with utf-8 before i go bald and the rest of my hair turns white! Platform: Mac OS X 10.2.6 Safari 1.0 (v85) Internet Explorer:mac...
1
by: Jay Douglas | last post by:
I need help getting the collections to show up in the property window of a user control. I want to be able to edit the collection items just like...
1
by: punkbot | last post by:
My application is processing a bunch of english and japanese data, composing some XML (utf-16) then transforming it (XsltCommand) (utf-8) to create...
5
by: Luis E Valencia | last post by:
I want to show how many visitors do I have at my website, If the user is logged I must show it on the list. If there 5 users not logged I must show...
4
by: zxo102 | last post by:
Hi there, I have a dictionary with values of Chinses Characters. For example, >>> dict = {} >>> dict="中国一" >>> dict="中国二" >>>...
4
by: devine | last post by:
Hi All, I am VERY new to Javascript. I have been provided with some code, which will enable me to hide/show a text area and change a submit...
2
by: joe | last post by:
how to read image from sql server to show in a image
23
by: Allan Ebdrup | last post by:
I hava an ajax web application where i hvae problems with UTF-8 encoding oc chineese chars. My Ajax webapplication runs in a HTML page that is...
39
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore...
1
oranoos3000
by: oranoos3000 | last post by:
hi would you please help me i have a online shopping center that i show pictures of the my product in home page. in the InterExplorer pictures...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.