String function
AdaBase.Driver.Base.[DB].trait_character_set ()

This is a connection attribute. It queries the connection directly to get the client-side encoding. The encoding is forced to UTF-8 by default, unless its overridden by set_trait_character_set before the connection is made.


Procedure
AdaBase.Driver.Base.[DB].set_trait_character_site (trait : String)

This procedure is used to set the client-side character encoding. It can only be set prior to the connection being established. If the trait argument is an empty string, then the connection will not be forced to UTF-8 and the result is that the encoding will mirror the database default. This can be checked using the trait_character_set which queries the value in real time. Most of the trait encoding values between PostgreSQL and MySQL will be the same, but some may be particular to the server. For SQLite, the encoding cannot by set. Any trait value other than "UTF8" or an empty string will result in an exception being thrown.


See client traits for a usage example.


[DB] is "MySQL.MySQL_Driver", "PostgreSQL.PostgreSQL_Driver", or "SQLite.SQLite_Driver"

See Also