original_string: protected static function convertBodyEncoding($body, $charset = '', $encoding = -1)
      {
          if ('' === $charset) {
              $charset = static::$charset;
          }
  
          if (!mb_check_encoding($body, $charset)) {
              $charset = mb_detect_encoding($body);
          }
  
          if ($charset === static::$charset) {
              return $body;
          }
  
          if (!in_array($charset, mb_list_encodings())) {
              $charset = $encoding === ENC7BIT ? 'US-ASCII' : static::$charset;
          }
  
          return mb_convert_encoding($body, static::$charset, $charset);
      }
code: protected static function convertBodyEncoding($body, $charset = '', $encoding = -1)
      {
          if ('' === $charset) {
              $charset = static::$charset;
          }
  
          if (!mb_check_encoding($body, $charset)) {
              $charset = mb_detect_encoding($body);
          }
  
          if ($charset === static::$charset) {
              return $body;
          }
  
          if (!in_array($charset, mb_list_encodings())) {
              $charset = $encoding === ENC7BIT ? 'US-ASCII' : static::$charset;
          }
  
          return mb_convert_encoding($body, static::$charset, $charset);
      }
code_tokens: protected static function convertBodyEncoding ( $ body , $ charset = '' , $ encoding = - 1 ) { if ( '' === $ charset ) { $ charset = static :: $ charset ; } if ( ! mb_check_encoding ( $ body , $ charset ) ) { $ charset = mb_detect_encoding ( $ body ) ; } if ( $ charset === static :: $ charset ) { return $ body ; } if ( ! in_array ( $ charset , mb_list_encodings ( ) ) ) { $ charset = $ encoding === ENC7BIT ? 'US-ASCII' : static :: $ charset ; } return mb_convert_encoding ( $ body , static :: $ charset , $ charset ) ; }
docstring: Convert body encoding from given coding to default
  
  @param  string $body
  @param  string $charset
  @param  int $encoding
  @return string
docstring_tokens: Convert body encoding from given coding to default