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 

Reading Unicode strings from SIL file (no BOM)

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



Joined: 04 Aug 2008
Posts: 5

PostPosted: Wed Sep 10, 2008 7:22 pm    Post subject: Reading Unicode strings from SIL file (no BOM) Reply with quote

Hello,

I have a program which is manually reading and parsing an SIL file. Now we have added languages to it which contain unicode character sets. I'm having a problem reading the SIL file properly because there is no "Byte Order Marking" at the beginning of the file so I don't know if the strings are encoded and stored UTF8, UTF16, etc., in the SIL. Can you tell me how unicode strings are stored or encoded in an SIL file?

Thanks,

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


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Thu Sep 11, 2008 6:43 am    Post subject: Reply with quote

Hello,

Regular SIL files contain data in ANSI format. If you need to convert it to Unicode you need to convert it based on Charset settings for the language to detect the appropriate code page. You can use AnsiStringToWideStringCP() function from siComp.pas. In the version 6.3 there was introduced UTF-8 support for SIL files. If SIL file is UTF8-encoded then under [Options] section there will be IsUTF8File key with True as value.
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