convert BSW codes for SWIS 2010

Alan Post alanpost at SUNFLOWERRIVER.ORG
Thu Aug 12 22:36:58 UTC 2010


On Mon, Aug 09, 2010 at 10:51:11AM -0500, Steve Slevinski wrote:
>  Hi Alan,
> 
> You can use the conversion package.
> Online: - http://www.signbank.org/iswa_dev/convert
> Download: - http://www.signbank.org/iswa_dev/convert.zip
> 
> There are 3 versions of BSW...
> 
> BSW 2008: - ISWA 2008 version of BSW
> 
> BSW 2010: - initial version of BSW for the ISWA 2010 ( May 11th, 2010)
> 
> BSW Revision 3: - final version of BSW for the ISWA 2010 ( June 22nd, 2010)
> 
> 
> To use online, there are 2 pages.
> 
> The first converts BSW 2008 to BSW 2010:
> http://signbank.org/iswa_dev/convert/example.php
> 
> The second converts BSW 2010 to BSW revision 3:
> http://signbank.org/iswa_dev/convert/bsw3.php
> 
> If you download the conversion package, you can create your own 
> conversion routine using PHP.  Include "swis.php" and make 2 function 
> calls.
> 
> The function "bsw2bsw" converts BSW 2008 to BSW 2010.  The function 
> "bsw2bsw3" converts BSW 2010 to BSW revision 3.
> 
> So if you have your data is BSW 2008 in the variable $bsw_08, you can 
> combine the functions calls as $bsw_r3 = bsw2bsw3(bsw2bsw($bsw_08));
> 
> Let me know if there's anything else you need,
> -Steve
> 

Steve,

This was great, thank you!

I am having a problem with the convert.zip program that I'm not
experiencing with the online version of the code.

I'm getting different results converting from bsw2008 to bsw2010
depending on whether I use the website or convert.zip: 

www: 00800110f8a7f8b382c0f8b9f8c1
zip: 00800110f8a7f8b386e0f8b9f8c1
                      ^^       

When I use the bsw2010 code to calculate a bswrev3, I get different
results too:

www: 0fb10038d39240c41826538c39241e426
zip: 0FB10038d39238f39b27038c3923a13a9
      ^^     ^^^^^^^^^      ^^^^^^

Testing has show that the www version is correct.  I get strange
results with my local copy of convert.zip.

For reference, here is the program I'm using:

#!/usr/bin/env php
<?php

include 'swis.php';
array_shift($argv);
forEach($argv as $bsw2008) {
  $bsw2010 = bsw2bsw($bsw2008);
  $bswrev3 = bsw2bsw3($bsw2010);
  printf("2008: %s\n", $bsw2008);
  printf("2010: %s\n", $bsw2010);
  printf("rev3: %s\n", $bswrev3);
}
?>


Is convert.zip out of date?  Am I using it incorrectly?  I surmise
the online version does differ from convert.zip, because the
hexadecimal strings in bsw2bsw3 are capitalized in convert.zip
and the web version emits lower-case hexidecimal numbers (I of
course understand this is an immaterial difference.)

Help?

-Alan
-- 
ko djuno fi le do sevzi



More information about the Sw-l mailing list