You are here

public function FilebrowserValidator::encodingToFs in Filebrowser 8.2

Same name and namespace in other branches
  1. 3.x src/Services/FilebrowserValidator.php \Drupal\filebrowser\Services\FilebrowserValidator::encodingToFs()

File

src/Services/FilebrowserValidator.php, line 85

Class

FilebrowserValidator

Namespace

Drupal\filebrowser\Services

Code

public function encodingToFs($encoding, $string) {
  return strcasecmp($encoding, 'UTF-8') == 0 ? $string : mb_convert_encoding($string, $encoding, "UTF-8");
}