original_string: protected function utf8Encode($s)
      {
          if (preg_match('//u', $s)) {
              return $s;
          }
  
          if (!\function_exists('iconv')) {
              throw new \RuntimeException('Unable to convert a non-UTF-8 string to UTF-8: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.');
          }
  
          if (false !== $c = @iconv($this->charset, 'UTF-8', $s)) {
              return $c;
          }
          if ('CP1252' !== $this->charset && false !== $c = @iconv('CP1252', 'UTF-8', $s)) {
              return $c;
          }
  
          return iconv('CP850', 'UTF-8', $s);
      }
code: protected function utf8Encode($s)
      {
          if (preg_match('//u', $s)) {
              return $s;
          }
  
          if (!\function_exists('iconv')) {
              throw new \RuntimeException('Unable to convert a non-UTF-8 string to UTF-8: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.');
          }
  
          if (false !== $c = @iconv($this->charset, 'UTF-8', $s)) {
              return $c;
          }
          if ('CP1252' !== $this->charset && false !== $c = @iconv('CP1252', 'UTF-8', $s)) {
              return $c;
          }
  
          return iconv('CP850', 'UTF-8', $s);
      }
code_tokens: protected function utf8Encode ( $ s ) { if ( preg_match ( '//u' , $ s ) ) { return $ s ; } if ( ! \ function_exists ( 'iconv' ) ) { throw new \ RuntimeException ( 'Unable to convert a non-UTF-8 string to UTF-8: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.' ) ; } if ( false !== $ c = @ iconv ( $ this -> charset , 'UTF-8' , $ s ) ) { return $ c ; } if ( 'CP1252' !== $ this -> charset && false !== $ c = @ iconv ( 'CP1252' , 'UTF-8' , $ s ) ) { return $ c ; } return iconv ( 'CP850' , 'UTF-8' , $ s ) ; }
docstring: Converts a non-UTF-8 string to UTF-8.
  
  @param string $s The non-UTF-8 string to convert
  
  @return string The string converted to UTF-8
docstring_tokens: Converts a non - UTF - 8 string to UTF - 8 .