SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Fixes for reading and write SIL file in Delphi 2009/2010

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite
View previous topic :: View next topic  
Author Message
suri



Joined: 24 Mar 2006
Posts: 2

PostPosted: Mon Apr 12, 2010 5:29 am    Post subject: Fixes for reading and write SIL file in Delphi 2009/2010 Reply with quote

I've been struggling to understand why SIL (with StoreASUTF8=True) is not maintaining the far-east language format properly in Delphi 2009/2010 even with the latest version of TsiLang. Then after examining the source codes, I realize that TEncoding.UTF8 needs to be included when calling LoadFromStream and SaveToStream. This is necessary when working with Delphi 2009/2010.

To Fix this, you will need to:
1. always set StoreASUTF8 to True (since this fix will only read and write SIL in UTF8)
2. in siComp.pas change the following (you may want to add conditional define to apply this fix to only delphi 2009/2010):
-Search for tmpLst.LoadFromStream(AStream); and replace it with tmpLst.LoadFromStream(AStream, TEncoding.UTF8);
-tmpLst.SaveToStream(AStream); and replace it with tmpLst.SaveToStream(AStream, TEncoding.UTF8);
3. You will need to recompile both design time and runtime package since runtime package is used by siLang Wizard in Delphi IDE.

Note to Igor: I've sent you the siComp.pas fixes awhile ago, but, don't know if you get it or not. If you want me to send the fixes to you again please let me know. Please fix this issue, so, I don't have to keep on patching it.

Suri
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Tue Apr 13, 2010 11:55 am    Post subject: Reply with quote

Hello,

Yes, I've received your email. It looks like my answer wasn't received. Anyway, thank you for your fix. But it may break the compatability for SIL files for earlier versions of Delphi. We will check this and include the fix for this in next update.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group