[sword-devel] Questions about usfm2osis.pl

Chris Little chrislit at crosswire.org
Wed Oct 28 14:22:28 MST 2009

DM is exactly right here.

DM Smith wrote:
> On Oct 28, 2009, at 12:04 PM, <johnduffy at cgcf.net> wrote:
>> Hi Daniel,
>> Yes, it works even using a relative path if only one file is specified 
>> but not the *.sfm.
> Expansion of * is something that the os needs to do. I don't know if or 
> how Windows does it.

I use usfm2osis.pl on Win32 most of the time and it works fine, but I 
run it in bash, which is doing wildcard expansion. I'd never considered 
the need to do this, but it should be easy enough to add this for use in 
  the Windows command shell.

On the other hand, I can heartily recommend the option of installing 
Cygwin, which will provide you both bash and perl.

>> It is interesting that an unrecognised character is seen at the start 
>> of the file, which appears as a square box in front of (or here on top 
>> of) the first backslash.
> This sounds like a BOM (byte order mark). FEFF, I think.  It can be 
> deleted if the file is utf-8.
>>  It also keeps the \id as in the extract below, but misses the book 
>> div and all book abbreviations in the verseIDs.
>> From USFM2osis.pl for single book of Psalms in Windows:
>> </header>
>> \id PSA

Yep, this is the BOM. I've never encountered on in USFM before, but it's 
simple enough to add a line to usfm2osis.pl that will delete it.


More information about the sword-devel mailing list