private static function Utils::removeUtf8Bom in Drupal driver for SQL Server and SQL Azure 3.0.x
Same name and namespace in other branches
- 8.2 drivers/lib/Drupal/Driver/Database/sqlsrv/Utils.php \Drupal\Driver\Database\sqlsrv\Utils::removeUtf8Bom()
Remove UTF8 BOM.
Parameters
string $text: UTF8 text.
Return value
string Text without UTF8 BOM.
1 call to Utils::removeUtf8Bom()
- Utils::deployCustomFunctions in drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Utils.php - Deploy custom functions for Drupal Compatiblity.
File
- drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Utils.php, line 139
Class
- Utils
- Utility function for the SQL Server driver.
Namespace
Drupal\Driver\Database\sqlsrvCode
private static function removeUtf8Bom($text) {
$bom = pack('H*', 'EFBBBF');
$text = preg_replace("/^{$bom}/", '', $text);
return $text;
}