Skip to content

Bug: Truncated email subject when contains accented characters #9122

Closed
@bereldhuin

Description

@bereldhuin

PHP Version

8.3

CodeIgniter4 Version

4.5.4

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

Linux

Which server did you use?

cli

Database

No response

What happened?

Setting an email with accented characters in subject (eg : french accent : éàè...) removes n characters at the end of the subjet (n = number of accented chars).

This does not occur in the body.

Steps to Reproduce

Send an email with accented char in the subject :

 $email = service('email');

$email->setFrom('toto@gmail.com', 'Fred');
$email->setTo('titi@gmail.com');

$email->setSubject('Email éé Test');
$email->setMessage('Testing the email class.');

$email->send();

Expected Output

Should send and email with the following subjet :
Email éé Test

But instead sends :

Email éé Te (missing 2 last chars)

Anything else?

Using php 8.3.9 under Alpine 1.20 docker container, and Gmail as SMTP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting for infoIssues or pull requests that need further clarification from the author

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions