Jump to content
Bruce Eglington

Recommended string format to work with UTF-8 databases

Recommended Posts

What is the best string definition for fields to use when working with a database using UTF-8 formated text fields. I have checked out numerous other blogs and forums, including Marco cantu's white paper but am left confused. Marco seems to suggest that defining fields as of type TUnicodeStringField is better than TWideStringField. Should all text fields for linking to databases be defined as TUnicodeStringField in the .DFM files and in the .PAS files? If so, I don't seem to be able to get this to work. I have only been able to implement TWideStringField. TStringField, which supposedly maps to TUnicodeStringField, also does not seem to work.

 

I am currently using a Firebird 3.x database (defined as using UTF-8), together with Delphi 12.1 and am updating older databases that used to use only ASCII strings.

 

Any guidance on the best practical option would be appreciated.

 

Thanks

Bruce

 

  • Like 1

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

×