Page 1 of 1

Error saving sil in 7.9.3

Posted: Wed Sep 21, 2022 8:12 am
by fherrero
We have installed version 7.9.3 and when saving a sil the strings in simplified Chinese are saved strangely and cannot be reloaded.
Screenshot_1.png
Screenshot_1.png (255.64 KiB) Viewed 24850 times
Is there a solution?

Thank you very much

Re: Error saving sil in 7.9.3

Posted: Wed Sep 21, 2022 8:23 am
by isiticov
Please send us the sample SIL and we will check it. It looks like the content was not converted to UTF8 or so.

Re: Error saving sil in 7.9.3

Posted: Thu Sep 22, 2022 7:15 am
by fherrero
I send you 2 sils, one with version 7.9.0.1 and the other with version 7.9.3.0. The old version works perfectly and the new one does not.
sils.zip
(100.69 KiB) Downloaded 769 times

Re: Error saving sil in 7.9.3

Posted: Thu Sep 22, 2022 8:06 am
by isiticov
Just checked your file with SIL Editor 6.5.24.143 (available on the web site for download):
2022-09-22_12-03-34.png
2022-09-22_12-03-34.png (74.13 KiB) Viewed 24841 times
and it creates SIL file exactly the same as yours ShoeData7.9.0.1.sil:
ShowData_SIL_6_5_24_143.zip
(49.45 KiB) Downloaded 1131 times
Could you please check your version of the SIL Editor?

Re: Error saving sil in 7.9.3

Posted: Fri Sep 23, 2022 7:29 am
by fherrero
Hi, I have checked the version of SIL Editor and the version is the same. I send you a video where you can see how I save the sil file and the translations are lost.

http://upload.inescop.es/www/?a=d&i=7001642185

Thank you very much and I hope you can help us

Re: Error saving sil in 7.9.3

Posted: Fri Sep 23, 2022 9:23 am
by isiticov
Thank you for the video. It helped us to find the problematic code and fix it. The fix will apply in next update release. If you have a Full Source license and can't wait till the update you can try to apply the fix by yourself.
The fix:
1. Open siComp.pas file.
2. Locate the method:

Code: Select all

function TsiCustomLang.SaveToStream(PropType: TStringsType;
  AStream: TStream; const Delimiter: Tstring): Integer;
3. Find the following lines below:

Code: Select all

      {$IFDEF DELPHI2009}
       S1 := ConvertLineFromUnicode(S1);
      {$ENDIF}
4. Replace them with the following:

Code: Select all

      {$IFDEF DELPHI2009}
      if not StoreAsUTF8 then
        S1 := ConvertLineFromUnicode(S1);
      {$ENDIF}
5. Rebuild the TsiLang run-time package (the one with R at the end of file name).

Re: Error saving sil in 7.9.3

Posted: Fri Sep 23, 2022 9:36 am
by fherrero
Thank you very much!