function mime_header_encode

Encodes MIME/HTTP header values that contain incorrectly encoded characters.

Parameters

$string: The header to encode.

Return value

string The mime-encoded header.

See also

mime_header_decode()

\Drupal\Component\Utility\Unicode::mimeHeaderEncode().

2 calls to mime_header_encode()
file_get_content_headers in drupal/core/modules/file/file.module
Examines a file entity and returns appropriate content headers for download.
PhpMail::mail in drupal/core/lib/Drupal/Core/Mail/PhpMail.php
Sends an e-mail message, using Drupal variables and default settings.

File

drupal/core/includes/unicode.inc, line 209
Provides Unicode-related conversions and operations.

Code

function mime_header_encode($string) {
  return Unicode::mimeHeaderEncode($string);
}