<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css">
<title>
Gambas Documentation - Connection.Charset
 (gb.db)</title>
</head>
<table class="none" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td align="left">
<font size="-1">
<a href="../../../../help+en"><img class="flag" alt="Home" border="0" src="../../../../img/lang/en.png" align="center"></a>&nbsp;
<a href="../connection+en">Up</a>&nbsp;
<a href="begin+en">Previous</a>&nbsp;
<a href="close+en">Next</a>&nbsp;
</td></tr></table>
<div class="notab">
<h1>
Connection.Charset
 (gb.db)</h1>
<div class="black"><font size="-2"><b>Syntax</b></font></div>
<pre class="syntax"><font color="blue">PROPERTY READ</font> <b>Charset</b> <font color="blue">AS</font> <font color="#0080FF">String</font></pre>
Returns the charset used by the database.
<p>
You can store your strings in the database directly in <a href="../../../def/utf8+en">UTF-8</a>, or you can use
this property and the <a href="../../../lang/conv+en">Conv$</a>() subroutine to convert them from <a href="../../../def/utf8+en">UTF-8</a>
to the database charset.
<p>
Using the database charset is heavier, because you need to use the <a href="../../../lang/conv+en">Conv$</a>()
subroutine each time you read or write a string field. But this is the only way if you
want to use the string SQL functions and sorts of the underlying database management system.
<p>
In the future, the conversion between <a href="../../../def/gambas+en">Gambas</a> strings and the database charset may become
automatic.

</div>
</body>
</html>

