original_string: protected static function normalizeEncoding($encodingLabel)
      {
          $encoding = strtoupper($encodingLabel);
          $encoding = preg_replace('/[^a-zA-Z0-9\s]/', '', $encoding);
  
          $equivalences = [
              'ISO88591'      => 'ISO-8859-1',
              'ISO8859'       => 'ISO-8859-1',
              'ISO'           => 'ISO-8859-1',
              'LATIN1'        => 'ISO-8859-1',
              'LATIN'         => 'ISO-8859-1',
              'UTF8'          => 'UTF-8',
              'UTF'           => 'UTF-8',
              'WIN1252'       => 'ISO-8859-1',
              'WINDOWS1252'   => 'ISO-8859-1'
          ];
  
          if (empty($equivalences[$encoding])) {
              return 'UTF-8';
          }
  
          return $equivalences[$encoding];
      }
code: protected static function normalizeEncoding($encodingLabel)
      {
          $encoding = strtoupper($encodingLabel);
          $encoding = preg_replace('/[^a-zA-Z0-9\s]/', '', $encoding);
  
          $equivalences = [
              'ISO88591'      => 'ISO-8859-1',
              'ISO8859'       => 'ISO-8859-1',
              'ISO'           => 'ISO-8859-1',
              'LATIN1'        => 'ISO-8859-1',
              'LATIN'         => 'ISO-8859-1',
              'UTF8'          => 'UTF-8',
              'UTF'           => 'UTF-8',
              'WIN1252'       => 'ISO-8859-1',
              'WINDOWS1252'   => 'ISO-8859-1'
          ];
  
          if (empty($equivalences[$encoding])) {
              return 'UTF-8';
          }
  
          return $equivalences[$encoding];
      }
code_tokens: protected static function normalizeEncoding ( $ encodingLabel ) { $ encoding = strtoupper ( $ encodingLabel ) ; $ encoding = preg_replace ( '/[^a-zA-Z0-9\s]/' , '' , $ encoding ) ; $ equivalences = [ 'ISO88591' => 'ISO-8859-1' , 'ISO8859' => 'ISO-8859-1' , 'ISO' => 'ISO-8859-1' , 'LATIN1' => 'ISO-8859-1' , 'LATIN' => 'ISO-8859-1' , 'UTF8' => 'UTF-8' , 'UTF' => 'UTF-8' , 'WIN1252' => 'ISO-8859-1' , 'WINDOWS1252' => 'ISO-8859-1' ] ; if ( empty ( $ equivalences [ $ encoding ] ) ) { return 'UTF-8' ; } return $ equivalences [ $ encoding ] ; }
docstring: Returns normalized encoding name from common aliases
  
  @param  string   $encodingLabel
  @return string
docstring_tokens: Returns normalized encoding name from common aliases