Subject | Re: [firebird-support] Bug with character sets |
---|---|
Author | Dimitry Sibiryakov |
Post date | 2009-05-19T20:48:06Z |
> Now Dimitry Sibiryakov claims that fbclient doesn't receive enough infoLength of string in characters.
> from the server to be able to trim to the right number of codepoints (or
> bytes for that matter), while Milan Babuskov actually does just that in
> FlameRobin.
>
> So:
>
> 1. What does Milan's code know that fbclient doesn't?
> 2. Where does Milan's code get that info from?From conversion from UTF8 to UTF16 (I have a feeling that Milan's
procedure can have incorrect results if encounter character with 4-bytes
code, though I most likely am wrong).
> 3. Why doesn't fbclient have that info?Because fbclient doesn't know what UTF8 is and how convert it into
UCS. FB client is rather simple tosser of data from transport packets
into client structures and back.
> 4. Can FB be changed so fbclient can get that info in the future, andMaybe, but so far nobody knows a good way to accomplish that.
> use it to trim the buffer to the right size before passing it to the
> client application?
> The last one, item 4, would constitute "a real solution" imo.If you can propose a good solution - feel free to discuss it in
Firebird-architect.
> That should 1) reduce the amount of client application bugs and 2) make it easier forNumber of application bugs can be reduced by application's developer
> client application code to trim the buffer content correctly.
only. No point to do other's job.
SY, SD.