arranb
arranb

Reputation: 105

£ still appearing in email even after putting html and php to UTF-8

i have set the php and html to UTF-8 and in my email the A£ still appears, i dont know what im doing wrong. Please ask for any code, instead of covering your screen with pointless code i thought it better if you ask what code you need

Upvotes: 2

Views: 1422

Answers (1)

Emil Vikström
Emil Vikström

Reputation: 91912

You will need to send a header indicating to the mail reader what character set you are using. The header for this is the same as in HTTP:

Content-Type: text/html; charset=utf-8

If you are using the regular mail function, put it with the fourth parameter ($additional_headers):

$headers = 'Content-Type: text/html; charset=utf-8';
mail($to, $subject, $message, $headers);

Upvotes: 5

Related Questions