473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 2436
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 5.2.3 (5815.1) Apache 2.0.47 PHP 4.3.2 (Apache 2...
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 any other asp.net control that has collection...
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 some HTML. I am redirecting the output into a...
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 5 Guests.
4
by: zxo102 | last post by:
Hi there, I have a dictionary with values of Chinses Characters. For example, >>> dict = {} >>> dict="中国一" >>> dict="中国二" >>> dict.values()
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 button dependant on a check box. <!DOCTYPE html...
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 UTF-8 Encoded. I copy and paste some chineese chars...
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 --skip-set-charset mydb mydb.sql # iconv -f...
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 is shown correctly but in Firefox browser is shown...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.