Subject Re: Trying to run TrackStudio :-)
Author the_a_rioch
> The issue with Java is, that every byte sequence has to be converted to
> a Unicode characters. That is Java. Period. Or access them as byte
> array. Another period. :)

In Delphi you has also option to have char array/pointer.
And after Delphi switched to Unicode - it is a messs... :-)

> With your Delphi background you can think of having only wide strings
> and doing oem-to-ansi conversion each time you get some raw data from
> disk or network.

No-no-no, OEM2ANSI is different beast - it is transcoding SBCSes, AnsiString in Delphi terms. But i understand what u meant. Since Windows is runing in two different russian encodings at same time - how can anyone from Russia forget those issues :-D

> In order to convert a byte steam into a string you
> have to make assumptions re in which encoding data is coming in.

And those assumptions should match at both sides of pipe.
I'd say they should be enforced to match.

> The
> encoding parameter in the connection string tells the server, in which
> encoding we want to receive data,

Conenction string ? Is it the thing we pass to FBClient.DLL, so it is exposed in data access components ? Or, respectively, connection string is JDBC URL.
I think that there is no connection string in the internal protocol used between server core and fbclient.dll/jaybird
There are probably some structs or sequence of API calls, but not that "connection string" ?

Just out of curiosity, it is not realyl important HOW is that property transferred.
But surely server SHOULD be somehow informed which connection charset attached client assumes to have.

> When you specify NONE encoding, then you explicitly tell

Stop here. That is not true!!!
The situation is not when i "explicitly specify NONE".
The situation is when i, having lack of knowledge, did not specify anything.

So the correct wording would be:

"When user does not specify NONE encoding, then he implicitly tell
server to perform no translation and hope that client will get it

Yeah ? i implicitly tell *database* server to hope. Implicitly. To hope. Kill me baby.

> right. It is a powerful mechanism to solve some problems in
> heterogenous environments, but when you use it wrong, you can make
> database unusable.

Exactly. And as such this mechanism should NEVER be engaged by accident. Only purposedly.

And curently, if connection is not specified, you treat it as specified NONE.
And then FB chooses to play-by-rulebook.
And then JB chooses to play-by-guessing.
Hilarity ensues. :-/