Forum > LCL

Cyrillic chars as ??? in FB Database with WIN1251

<< < (2/2)

Zoran:

--- Quote from: 62mkv on March 29, 2010, 05:03:23 pm ---Probably but NOT

--- End quote ---

Probably it was not supported in old Firebird version 1, which you use.


--- Quote from: 62mkv on March 29, 2010, 05:03:23 pm ---is it possible (if yes then how) to tell about this problem to SqlDb developers ?

--- End quote ---

It is probably possible, I don't know how.
If you try ZEOS, you can ask for support on their forum.
It might be worth trying, but I am afraid that you'll get the answer to switch to Firebird 2.1.3.

62mkv:
thanx, but I think it's uncorrect advice - "Switch to Firebird 2.1.3"

it's just like you would ask for advice, on where to get higher wheels for you Toyota Vitz, in order to ride better on bad roads in Russia (they're truly horrible here) and they would advice you to move to Germany with theirs autobahns and forget about this old unsupported Russia :)

I want to say that I would long ago switch to FB 2.1.3, to MS SQL or Oracle or whatever, if I could to !!

Zoran:

--- Quote from: 62mkv on April 01, 2010, 02:27:24 pm ---thanx, but I think it's uncorrect advice - "Switch to Firebird 2.1.3"

it's just like you would ask for advice, on where to get higher wheels for you Toyota Vitz, in order to ride better on bad roads in Russia (they're truly horrible here) and they would advice you to move to Germany with theirs autobahns and forget about this old unsupported Russia :)

I want to say that I would long ago switch to FB 2.1.3, to MS SQL or Oracle or whatever, if I could to !!

--- End quote ---

Sorry, I apologize. :-[

I'm just afraid that old Firebird server can't do converting to UTF8 charset for you, but I don't know.

Actually, you might be able to get responce from SQLdb developers if you put a bug report on bugtracker.

Try also to ask ZEOS team on their forum about your problem.

I'm afraid that you might get answer that they will not put hard work now to support old database version, but you should try.

If that is the case, try using fiels' OnGetText and OnSetText, that is a workaround (as described here: http://www.lazarus.freepascal.org/index.php/topic,5963.msg43634.html#msg43634).

cd:
if it is possible in your case you could manually convert strings to utf8 using

--- Code: ---function AnsiToUtf8(const s : ansistring): UTF8String;
--- End code ---
i do such things for old sqlite-based win1251 database.

Zoran:

--- Quote from: cd on April 02, 2010, 06:47:30 pm ---if it is possible in your case you could manually convert strings to utf8 using

--- Code: ---function AnsiToUtf8(const s : ansistring): UTF8String;
--- End code ---
i do such things for old sqlite-based win1251 database.

--- End quote ---

If you know which encoding it is, you should use functions from LConvEncoding unit instead of AnsiToUTF8, in this case it would be CP1251ToUTF8 function.

Like in example from the topic I linked to in my previous post:

--- Code: ---uses
  ... , LConvEncoding;

.....

procedure TForm2.ZQuery1Field2GetText(Sender: TField; var aText: string;
  DisplayText: Boolean);
begin
   aText := CP1251ToUTF8(Sender.AsString);
end;

--- End code ---

Navigation

[0] Message Index

[*] Previous page

Go to full version