<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - FIREBIRD: Couldn't create a varchar-field with less than 20 characters in GUI"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=105711#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - FIREBIRD: Couldn't create a varchar-field with less than 20 characters in GUI"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=105711">bug 105711</a>
from <span class="vcard"><a class="email" href="mailto:btomi96@gmail.com" title="Tamas Bunth <btomi96@gmail.com>"> <span class="fn">Tamas Bunth</span></a>
</span></b>
<pre>The driver uses UTF-8 encoding for text-based columns (char, varchar, clob).
see: <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - FIREBIRD 3 - create default collation or character set on database creation"
href="show_bug.cgi?id=105142">https://bugs.documentfoundation.org/show_bug.cgi?id=105142</a>
A character now occupies up to 4 bytes, so when the 'length' option in the GUI
is set to 5 it will allocate 20 bytes.
You can put more than 5 characters, because most of the characters don't need
all the 4 bytes. Eg. you can put 20 characters if you use only the first 128
characters of ASCII.
SO what is the correct behavior of the 'length' GUI option set to 5?
- The user can put 20 bytes to the field. (it is the current version)
- The user can put only 5 characters even if there is more space allocated.
I think the correct one would be the second: the user can put only 5 characters
(because the first version is really annoying when using the fixed char column,
it is more straightforward and the functionality is the same as with HSQLDB).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>