Subject Re: [Firebird-Java] Re: PS about client-to-FBcore protocols regarding charset, #5.
Author Roman Rokytskyy
2012-07-03 10:28, the_a_rioch написав:
>> So, I believe the rule should be either:
>>
>> - All clients are able to consume data in UTF-8. Period. All Delphi
>> users will cry when they start to convert Unicode strings to SBCS
>> and back.
>
> FBClient is not required to break external API

You can't. The logic of something-to-NONE conversion is that "read"
will take data as is, in our case that would be UTF8. The write must be
prohibited, since the binary data passed from application may be
malformed UTF8.

> Even if, for example in FB3, new version of wire protocol introduced,
> making Unicode or charset specification madatory, that would not
> break
> Delphi applications, provided that FBClient would make it's work of
> translating wire protocol to used DLL API correctly, including
> transparent charset changes if needed.

If charset is specified, that will work, if it is omitted - it should
drop the connection.

>> - All clients get what they ask for. Those asking UTF-8 get UTF-8,
>> those
>> asking WIN1251 get WIN1251, and when umlauts are stored - they get
>> an
>> error "Cannot transliterate characters between character sets".
>
> The fact that BLOBs can get around such limitations would lead to
> "VARCHAR too" wishes, and they would be reasonable :-)

The BLOBs are delivered "as is" to the client and the client has to
take care of conversion. That is wrong.

Roman