Welcome Guest, Not a member yet? Register   Sign In
E-mail and UTF-8, mb_, etc.
#1
Question 
(This post was last modified: 03-27-2024, 02:21 AM by joho.)

Looking at the Email class in CI4, shouldn't things like setMessage() and possibly other functions utilize mb_ functions for trimming, replacing, and so on to support multi-byte data properly? This includes functions like setReplyTo(), setFrom(), and setTo() in regards to the $name parameter, since it's technically possible (I think?) for these to contain multi-byte data.

It'd also be nice if the initialize() function had a bool parameter, $clearPrevious = true, that would allow calling initialize() multiple times for additive settings. Or, have another function, config(), which did not clear the previous configuration/settings.

With the disclaimer that I've just started looking into the Email class :-)

The automatic conversion from HTML to create a plain text part, should probably take <br> and <p> into account.

Replace all <br> and <br/> and <br /> to whatever the configured line ending is.
Replace all <p> with nothing, and </p> to two times whatever the configured line ending is.

I think it's reasonably safe to assume that if you have <br/> and <p> tags in your HTML, you'd want them to "carry" over to a plain text part in some way.

-joho
Reply


Messages In This Thread
E-mail and UTF-8, mb_, etc. - by joho - 03-27-2024, 02:07 AM
RE: E-mail and UTF-8, mb_, etc. - by joho - 03-27-2024, 07:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB