Set the character set before making a connection

Ideally the character set should be set with the connection, and so this is
exactly what's being done now.

And now the character set code is attempted to be generalised.
This commit is contained in:
Alexei Sorokin
2020-09-16 19:34:49 +03:00
parent c2508f8fa2
commit aed2344bd4
9 changed files with 118 additions and 54 deletions

View File

@@ -2390,6 +2390,15 @@ function common_compatible_license($from, $to)
return ($from == $to);
}
/**
* returns the character set name used for the current DBMS
*/
function common_database_charset(): string
{
$schema = Schema::get();
return $schema->charset();
}
/**
* returns a quoted table name
*/