Forum > LCL

Cyrillic chars as ??? in FB Database with WIN1251

(1/2) > >>

62mkv:
I have a FB 1.0.3 Database, with a following DDL:

SET SQL DIALECT 3;

SET NAMES WIN1251;

CREATE DATABASE 'YMKM:C:\Develop\ezTask\Db\ezt1.fdb'
USER 'SYSDBA' PASSWORD 'masterkey'
PAGE_SIZE 16384
DEFAULT CHARACTER SET WIN1251;

I'm a newbie to Lazarus, trying to switch from Delphi 7

and the most simple thing brought me "on my knees" - I cannot achieve a normal work with this DB on an LCL form.

All the DBxxx components display only the  ???? (question marks) instead of russian text in a DB, while Latin text in the very same filed are displayed OK

the only Lazarus relevant setting in Lazrus, that I could find, is a property Charset of TIBConnection. Of course I set it to "WIN1251", as I would normally do in Delphi, but.. the result is on a screenshot.

Paul Ishenin:
Lazarus uses UTF8 strings and you are getting strings in win1251 encoding. As result they are shown as question marks. Try to setup your database connection or convert your database to UTF8. At work I'm using firebird 2.1 database with UTF8 database. I have no problems to represent that data in lazarus database components.

62mkv:
>Try to setup your database connection
this is what I am asking for !!! HOW to do that ?

>or convert your database to UTF8.
it's currently impossible - there're several already widely used Delphi applications worknig with this database. too much for just for "his majesty Lazarus" compatibility

Zoran:

--- Quote from: 62mkv on March 28, 2010, 04:04:37 pm --->Try to setup your database connection
this is what I am asking for !!! HOW to do that ?

--- End quote ---

If you use ZEOS components, add this line to ZConnection's "properties" property:

--- Code: ---codepage=UTF8

--- End code ---

If you are using SqlDB (IBConnection), then probably you can do same by adding this line to params property. Try.

This should tell the server what your client encoding is (and it is UTF8). Then, the server should convert text before sending it to your application.

62mkv:
Probably but NOT

this changes nothing in this behaviour.

is it possible (if yes then how) to tell about this problem to SqlDb developers ?

Navigation

[0] Message Index

[#] Next page

Go to full version