> Unfortunately the implementation of UTF-8 in Firebird is annoying
> because it reduces that maximum allowed number of characters to a 1/4 of
> that for single byte character sets making it necessary to switch to
> blobs sooner.

IIRC, old Interbase versions defined maximum Varchar length in *bytes*,
which led to situation that *some* utf-8(then fss) strings could cause
runtime error when storing them.
To avoid this, later versions grant that *all* possible strings can be 
stored
without raising error. It is done by limiting maximum declared length
of varchar to accomodate the worst case = as if all characters in the string 
are
4 bytes (utf-8) or 3 bytes (fss).

I think quite a lot of applications do not need such strong limit.
E.g. application that I work on now is so depending on czech environment 
(laws,
data suppliers, etc.) that it could never ever use more than 2 byte utf-8 
character.

I think it could be useful to allow to define own bytes/character constant
for computing maximum varchar length
(RDB$CHARACTER_SETS.RDB$BYTES_PER_CHARACTER)

Ivan 


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to