Corrupted Blob fields with DA/UniDac SQLite and Asian Windows locale

Hi,

I’m using Delphi XE3 32-bit with RO/DA 7.0.67.1073, and UniDAC 4.6.12 with SQLite DB.

Please consider the attached Demos: da-blob-korean.zip (792.4 KB)

  • “VCLApplication.dpr” is a DA/UniDac demo showing the problem
  • “UniDac Demo\Project1.dpr” is a UniDac only demo showing that the problem is not in UniDac

Description of the problem:

  • This only occurs when the Windows’ system locale is set to an Asian language such as Korean. To do this in Windows: Start, then type Region, then go to the Administrative tab, then click “Change system locale”, select Korean and reboot
  • When a blob field is added from a stream: it is store corrupted in the table and DB. This happens on both the client and server as shown in VCLApplication.dpr sample

How to reproduce:

  • Run VCLApplication.dpr, click “Activate and Insert” and check the log it displays. It will work fine in a Windows with “English” locale but not with “Korean” or other Asian locale.

Note:

Thank you for your help.

Regards,

John.

Hello,
We couldn’t reproduce it.
We tested in on Win7 x32 + UniDAC5
Can you test your project on later UniDAC versions?
Can you check version of SQLite library?

Hi,

I’ll try to update UniDac but before that, can you confirm that you have modified your Windows system local to Korean and rebooted the computer for the purpose of this test ? As mentioned in the original report, this does not happen for English or Western European languages.

Regards,

John.

I can confirm that this is still happening with the latest UniDac version 5.2.5!
SQLite library used is the latest one: 3.8.2

Hello,
We reproduced it. This issue was logged as #65933.
We are working on it. We will send you a workaround at the nearest time.

Hello,
I’m glad to read that and I’m looking forward to the fix as this is becoming urgent for me.
Thank you.

Hello,

As a temporary workaround you can use the following:
uDACRLabsUtils.inc

procedure WriteCrLabsParamValues(InputParams : TDAParamCollection; OutputParams: TDAParams; IgnoreBlobType : boolean = false; AWideMemoAsWideString: Boolean = False);
.....................
datBlob : begin
          if VarIsArray(par.Value) then
            outpar.AsAnsiString := VariantToAnsiString(par.Value)  //<==== or: outpar.Value := par.Value;
          else
            outpar.Value := par.Value;
        end;

This solves the problem in the demo I sent you but not in my main app. Should this fix be applied everywhere the same patterns occurs with a TDAParams in the source code ? I’ve found quite a few of them.
I’ll try to create a demo showing the problem.

Hello,
You can use it everywhere but it is a temporary solution. Waiting for a demo showing the problem.

I’m having a hard time reproducing this outside of the main application to create a demo.
When do you estimate the final solution will be available ?

Hello,
We planned to fix it in February 14 Release. But it will be better if you provide a testcase because we can fix it only for our case.

Was the February 14 release postponed ? I can’t see it in the portal section.
Thanks.

Yes it will be released a bit later.

Any estimate on release date ? Thanks.

Hello,
We planned to middle of March. But we don’t guarantee that it will help to your main project. To fix it completely we need the testcase which reproduces it.