Recent

Author Topic: String and Database problem  (Read 2881 times)

thehidden

  • Jr. Member
  • **
  • Posts: 76
  • Freelancer
Re: String and Database problem
« Reply #15 on: May 29, 2020, 02:00:00 pm »
Perhaps ElevateDB connection tries to do string conversions based on passed string encoding (which could make problem in LCL).

You might try this:
Code: Pascal  [Select][+][-]
  1. var
  2.    temptxt1 : string;
  3.    temptxt2 : UTF8String;
  4. //...
  5. //...
  6.  
  7. Thank you, but nothing changed.
  8.  
  9. I have asked the manufacturer, because it works with Delphi. No answer so far.
  10.     // Instead of this:
  11.     // EDBDatabase1.Execute(temptxt1);
  12.     // just try:
  13.     temptxt2 := UTF8String(RawByteString(temptxt1));
  14.     EDBDatabase1.Execute(temptxt2);
  15.  
I am mostly writing software for Image/Video based Process Documentation and Warehouse/Invoicing.
Other Software only if the project is interesting.

thehidden

  • Jr. Member
  • **
  • Posts: 76
  • Freelancer
Re: String and Database problem
« Reply #16 on: June 03, 2020, 09:15:10 am »
UPDATE:
Together with the forum from ElevateDB I got the confirmation that it is only a problem with Lazarus/Free Pascal.

Lazarus uses UTF-8 , Delphi UTF-16 and ElevateDB uses UTF-16.
Developer of ElevateDB must do some work on their code to make it work with Lazarus.

In the meantime I will store text as base64 in the database. Makes some more work, but I have used this way in the past for other reasons.
I am mostly writing software for Image/Video based Process Documentation and Warehouse/Invoicing.
Other Software only if the project is interesting.

 

TinyPortal © 2005-2018