[sword-devel] Encoding of module config files?

Troy A. Griffitts scribe at crosswire.org
Wed Aug 24 17:36:34 MST 2005


Hey guys.  A couple days back I added a new repository: crosswire-java 
for all the java tools we use on the site.  I hope to get them all into 
a nice project and take out a bunch of silly hardcoded paths and such, 
then we can easily fix things like this.  I doubt we're specifying an 
encoding when reading the conf files in, but don't remember.  I'll try 
to have a look when I get this new project up and running.  I'm in 
favour of defining a rule that says the .conf file is the same encoding 
as the module (defined by the Encoding= entry in the .conf)  And since 
the default encoding is UTF-8, JSword could assume UTF-8 and only reread 
the ones that specify otherwise-- I don't think there are many modules 
that specify otherwise, but on handhelds and such, I don't want to 
remove the ability for alternate encodings.  Ideas?

		-Troy.


DM Smith wrote:
> A thread around 2/14/2005 said that a conf in utf-8 would work, but that 
> there were some problems if the file began with a BOM. Troy stated that 
> the software should be changed to ignore it. Don't know if that was done.
> 
> I presume that the thread meant that it may be in cp1252.
> 
> With Java, it uses utf-8 internally, but will try iso8859-1 it is not 
> utf-8. I does not try cp1252, which Sword uses in place of iso8859-1. So 
> with JSword, we have assumed that it could be utf-8, which means that 
> certain characters in cp1252 which could be in the conf are not supported.
> 
> It would be nice to know if the conf were utf-8 or not. If it is in the 
> conf, then JSword would need to read the file 2 times. If it were 
> external to the conf, then it would only need to read the file once (and 
> the meta-conf file once).
> 
> Best yet, it would be great to convert all of the conf's to utf-8 and be 
> done with it.
> 
> Joachim Ansorg wrote:
> 
>> Hi,
>> I was just updating a german beta module and noticed a problem.
>> I encoded the config file about section in utf8, because the module is 
>> in Unicode, too. In BibleTime we load the config file as unicode if 
>> the line Encoding=UTF-8 is in that file.
>>
>> The download page seems to assume latin1 as the config file encoding. 
>> That's no problem for english modules but it needs to be addressed for 
>> other languages.
>>
>> What is the right encoding?
>> I can fix the download script if unicode should be used.
>>
>> Joachim
>>  
>>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page



More information about the sword-devel mailing list