Jump to content
y2nd66

Help with IBObjects, Interbase 7.5 & Delphi 10.4

Recommended Posts

I am trying to compile an application from a few years ago.

 

I don't remember what was the last environment where compiled it.

 

Now I try with Delphi 10.4.1 and with IBO 5.12.1-B2967, the database is working on Interbase 7.5.1.162.

 

The records that are texts, any visual component shows them with some strange codes.
Any ideas how I can fix this?

 

Thank you

 

 

2020-12-21_142433.png

Share this post


Link to post
Guest

review the CHARSET in use!!! normally, in "connection string" of Database component!

Share this post


Link to post
13 minutes ago, emailx45 said:

review the CHARSET in use!!! normally, in "connection string" of Database component!

I've tried all of them.

 

Except for OCTETS and UTF8 that does not allow me to connect to database, the others continue to show the same characters.

Edited by y2nd66

Share this post


Link to post

Now reviewing the code remember not having specified a character set when creating the base.

By definition of Interbase the character set defaults is NONE. This value is in use in the source code.

Share this post


Link to post
Guest

"NONE" is used for universal use, or be, the "char" by itself!

Share this post


Link to post
13 hours ago, emailx45 said:

"NONE" is used for universal use, or be, the "char" by itself!

this is what i was trying to say:

Using CHARACTER SET NONE

If a default character set was not specified when the database was created, the character set defaults to NONE. Using CHARACTER SET NONE means that there is no character set assumption for columns; data is stored and retrieved just as you originally entered it. You can load any character set into a column defined with NONE, but you cannot load that same data into another column that has been defined with a different character set. No transliteration will be performed between the source and destination character sets, so in most cases, errors will occur during the attempted assignment.

 

from Wiki Embarcadero for Interbase

Share this post


Link to post
4 hours ago, Dany Marmur said:

Did you solve your problem?

More or less, I had to modify the source code of IB_Components.pas

 

I have to test if the change is effective for my entire environment, I still need more time to know.

Share this post


Link to post
6 hours ago, y2nd66 said:

If a default character set was not specified when the database was created, the character set defaults to NONE. Using CHARACTER SET NONE means that there is no character set assumption for columns; data is stored and retrieved just as you originally entered it.

Doesn't this equal to a localized ANSI codepage...? In this case a solution would be to

1, Convert the underlying DB to UTF-8-16 and forget about encodings for a while

2, Change the access components to one which allows you to tell the RDBMS in what codepage string literals should be converted to before sending it to you - if Interbase supports this. Zeos has this and so does FireDac (as far as I see from Google).

3, Override the String field's OnGetText event and manually covert the byte array to a Unicode string on-the-fly

4, Feels a bit hacky but you also can go through all tables, read all string fields as a byte array, convert them to Unicode and put them back like that

Share this post


Link to post
Guest
19 hours ago, y2nd66 said:

More or less, I had to modify the source code of IB_Components.pas

No. No. IBObjects' charset handling is definitely on par with any other DAC. Contact the vendor for support. Source changes *will* bite back.

13 hours ago, aehimself said:

Change the access components to one which allows you to tell the RDBMS in what codepage

Do you really know that much about IBObjects?

Share this post


Link to post
On 12/22/2020 at 7:20 AM, y2nd66 said:

More or less, I had to modify the source code of IB_Components.pas

 

I have to test if the change is effective for my entire environment, I still need more time to know.

I am the author of IB Objects and would be interested to have a look at the changes you made to IB Objects source.  I will be able to tell you if what you have done is a good idea or not.

Thanks,

Jason Wharton

Share this post


Link to post
8 hours ago, Jason Wharton said:

I am the author of IB Objects and would be interested to have a look at the changes you made to IB Objects source.  I will be able to tell you if what you have done is a good idea or not.

Thanks,

Jason Wharton

Yesterday, I wrote an email trying to contact you to "support at ibobjects dot com", with the detail of the modification and asked the same, if was valid or not.

Thanks.

Edited by y2nd66

Share this post


Link to post
6 hours ago, y2nd66 said:

Yesterday, I wrote an email trying to contact you to "support at ibobjects dot com", with the detail of the modification and asked the same, if was valid or not.

Thanks.

Unfortunately I didn't receive it.  Please try sending it directly to jason at jwharton dot com.

Edited by Jason Wharton
scrub email

Share this post


Link to post
20 hours ago, Jason Wharton said:

Unfortunately I didn't receive it.  Please try sending it directly to jason at jwharton dot com.

sent...

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×