Commit 2be0797a authored by Alex Vandiver's avatar Alex Vandiver
Browse files

_utf8_on in EncodeToMIME is needless and incorrect; remove it

66930fd8 switched from an explicit _utf8_off to an explicit _utf8_on, in
an attempt to switch from splitting on bytes to splitting on characters.
However, the "UTF8" flag does not magically determine if a string is
bytes or characters.  Instead, only consistency in calling convention
can do so.  All callsites of RT::Interface::Email::EncodeToMIME and
RT::Action::SendEmail::MIMEEncodeString now pass character strings; all
that _utf8_on can do is incorrectly "decode" those strings as UTF-8 if
they happen to not have the "UTF8" flag set.
parent b2db8fc6
......@@ -811,9 +811,6 @@ sub EncodeToMIME {
$value =~ s/\s+$//;
# we need perl string to split thing char by char
Encode::_utf8_on($value) unless Encode::is_utf8($value);
my ( $tmp, @chunks ) = ( '', () );
while ( length $value ) {
my $char = substr( $value, 0, 1, '' );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment