Subject | Re: [Firebird-Java] Re: PS about client-to-FBcore protocols regarding charset, #5. |
---|---|
Author | Roman Rokytskyy |
Post date | 2012-07-03T11:43:57Z |
2012-07-03 10:28, the_a_rioch написав:
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.
drop the connection.
take care of conversion. That is wrong.
Roman
>> So, I believe the rule should be either:You can't. The logic of something-to-NONE conversion is that "read"
>>
>> - 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
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,If charset is specified, that will work, if it is omitted - it should
> 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.
drop the connection.
>> - All clients get what they ask for. Those asking UTF-8 get UTF-8,The BLOBs are delivered "as is" to the client and the client has to
>> 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 :-)
take care of conversion. That is wrong.
Roman