Error saving sil in 7.9.3

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
fherrero
Posts: 11
Joined: Wed Nov 05, 2008 8:30 am

Error saving sil in 7.9.3

Post 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 17235 times
Is there a solution?

Thank you very much
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Re: Error saving sil in 7.9.3

Post 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.
Best regards,
Igor Siticov.
fherrero
Posts: 11
Joined: Wed Nov 05, 2008 8:30 am

Re: Error saving sil in 7.9.3

Post 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 557 times
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Re: Error saving sil in 7.9.3

Post 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 17226 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 839 times
Could you please check your version of the SIL Editor?
Best regards,
Igor Siticov.
fherrero
Posts: 11
Joined: Wed Nov 05, 2008 8:30 am

Re: Error saving sil in 7.9.3

Post 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
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Re: Error saving sil in 7.9.3

Post 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).
Best regards,
Igor Siticov.
fherrero
Posts: 11
Joined: Wed Nov 05, 2008 8:30 am

Re: Error saving sil in 7.9.3

Post by fherrero »

Thank you very much!
Post Reply