Subject Re: [Firebird-Architect] The Wolf on Firebird 3
Author Geoff Worboys
Jim Starkey wrote:
> Geoff Worboys wrote:
>>Are we sure that we should not seriously consider UTF-16?
>>
> What is the benefit of UTF-16? To the best of my knowledge,
> there are no strings that can be represented in UFT-16 in
> less bytes than UTF-8 (Chinese exempted. I don't really know
> anything about Chinese, but I can wing it). On the other
> hand, the existence of Chinese doesn't get UTF-16 out of the
> multiple-segment character representation business. If UTF-16
> doesn't solve the multi-segment character problem and is less
> efficient that UTF-8, what could it possibly have going for it?

> So, make a case for UTF-16 and we'll consider it.

The (possible) benefit is that interactions with the API may
be able to use UTF-16 data directly in some cases (const ptrs
to output functions), and with simple memcpy in other cases.
No translation required.

OTOH UTF-8 is likely to require translation to UTF-16 in most
common client use. ie. To read database info into Qt it will
need to be translated. To pass to the Windows API it will
need to be translated etc etc etc.

That is the benefit that I see, but there are costs (especially
with incompatible client/server endianness). I do not have the
experience to guess which way the scales may balance.

--
Geoff Worboys
Telesis Computing